February 5, 2011

C Program to Round Up a Number

This program is shared by Krunal Panchal, thanks for your contributions. Feel free to submit your program's to be posted on my c files.

This is a program for rounding up and down float values in c

For e.g if you have got float value of 8.5 then it is converted in to 9 and when you have got float value of 8.4 then it would be converted into 8.
Same way for any float value it could be converted to round up value into an integer.


//C Program to Round Up a Number
void main()
float n;
int i;
printf("\nEnter the Value\n\n");
printf("\nRound up value= %d",i);

Hope you liked my posts, give comments if you have any doubts.. :)

Related Posts :

Categories: ,


Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

Related Posts with Thumbnails