1 2 3 4 5 6 7 8 9 10
#include <stdio.h> #include <stdint.h> int main() { uint32_t upper_bound = 42; uint32_t min = -upper_bound % upper_bound; printf("%u -> %u\n", upper_bound, min); return 0; }
1
42 -> 4