Coding Zone
Sunday, November 14, 2010
Round Up Values in C
# include <stdio.h>
# include <conio.h>
void main()
{
double d;
int i;
clrscr();
d=8.5;
i=(d<0)?d-0.5:d+0.5;
printf("The round up value is ::%d",i);
getch();
}
Output: The round up value is ::9
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)