123456789101112131415161718 |
- #include <stdlib.h>
- #include "counter.h"
- void read_ulong(unsigned long *r) {
- *r = 0;
- for (unsigned long i = 0; i < sizeof(unsigned long); i++)
- *r |= ((unsigned long)fgetc(stdin)) << (i*8);
- }
- int main(int argc, char **argv) {
- unsigned long number;
- read_ulong(&number);
- counter_create(number, stdout);
- return 0;
- }
|