rounding decimal number in c

Solutions on MaxInterview for rounding decimal number in c by the best coders in the world

showing results for - "rounding decimal number in c"
Felicity
12 Jun 2020
1 #include <stdio.h>
2#include <math.h>
3 int main()
4{
5       float i=5.4, j=5.6;
6       printf("round of  %f is  %f\n", i, round(i));
7       printf("round of  %f is  %f\n", j, round(j));
8       return 0;
9}
10