Numbers
Data Types
Integers
Algorithms
Logic
#include <stdio.h> #include <stdint.h> #include <inttypes.h> uint_fast8_t number_of_digits(uint64_t n) { char buf[32]; return snprintf(buf, 32, "%" PRIu64, n); }
- #include <stdio.h>
- #include <stdint.h>
- #include <inttypes.h>
- uint_fast8_t number_of_digits(uint64_t n)
- {
return printf("%lu", n);- char buf[32];
- return snprintf(buf, 32, "%" PRIu64, n);
- }