#include <stdio.h>
#include <math.h>
int roundUpToNearest10(double num) {
return (int)ceil(num / 10) * 10;
}
int main(void) {
printf("%d\n", roundUpToNearest10(33));
printf("%d\n", roundUpToNearest10(59));
printf("%d\n", roundUpToNearest10(599.99));
printf("%d\n", roundUpToNearest10(3.14));
printf("%d\n", roundUpToNearest10(2));
printf("%d\n", roundUpToNearest10(19));
printf("%d\n", roundUpToNearest10(-12));
printf("%d\n", roundUpToNearest10(-101));
printf("%d\n", roundUpToNearest10(-109));
return 0;
}
/*
run:
40
60
600
10
10
20
-10
-100
-100
*/