#include <stdio.h>
// The next highest multiple of eight
unsigned int roundToMultipleOf(unsigned int number, unsigned int roundTo) {
return (number + (roundTo - 1)) & ~(roundTo - 1);
}
int main() {
printf("%d\n", roundToMultipleOf(9, 8));
printf("%d\n", roundToMultipleOf(19, 8));
printf("%d\n", roundToMultipleOf(71, 8));
return 0;
}
/*
run:
16
24
72
*/