work.c
Example source referenced by the lesson. It does not run on this site. Learn
#include <stdint.h>
/* Deliberately simple: the observable result is n, including at n == 0. */
uint64_t count_steps(uint64_t n) {
uint64_t total = 0;
for (uint64_t i = 0; i < n; ++i) {
total += 1;
}
return total;
}