#include <stdio.h>
#include <math.h>
int main(int argc, char **argv)
{
float value, result;
value = 5.2;
result = ceil(value);
printf("The floor of %.2f is %.2f\n", value, result); // 6.00
value = 5.4;
result = ceil(value);
printf("The floor of %.2f is %.2f\n", value, result); // 6.00
value = 5.5;
result = ceil(value);
printf("The floor of %.2f is %.2f\n", value, result); // 6.00
value = 5.6;
result = ceil(value);
printf("The floor of %.2f is %.2f\n", value, result); // 6.00
return(0);
}
/*
run:
The floor of 5.20 is 6.00
The floor of 5.40 is 6.00
The floor of 5.50 is 6.00
The floor of 5.60 is 6.00
*/