Thursday, September 29, 2011

WAP to show use of ceil and floor function

#include<stdio.h>
#include<conio.h>
#include<math.h>
int main()
{
float x=1.66;
float y=1.75;
clrscr();
printf("%f\n%f",ceil(y),floor(x));
getch();
}

o/p
x=2.000000
y=1.000000


No comments:

Post a Comment