Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

how to use round function

+1 vote
asked Jul 28, 2018 by akim (130 points)

1 Answer

0 votes
answered Jul 28, 2018 by JEEVITHADHANDAPANI
#include<stdio.h>
int main()
{
    float f;
    scanf("%f",&f);
    printf("%.2f\n",ceil(f));// round off to next higher value
    printf("%.2f\n",floor(f));// round off to lower value
    return 0;
}
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...