Question
Display the Given Float Value as the Nearest Integer Value
Sample TestCase Expected Output
1. 12.412
2. 12.813
#include<stdio.h> #include<math.h> int main()
{ float num;
scanf("%f",&num);
printf("%.0f",num);
return 0;
}
This comment has been removed by a blog administrator.
ReplyDelete