HOME | LAB PROGRAMMING | RATIONAL ROSE DIAGRAM | COMPUTE GRAPHICS | CLASS DIAGRAM | NETWORK PROGRAMING | BEST OF THE SITE

Math function in c|ceil and floor function in c| Roundup performance in c

What is the ceil and floor function in the match header file
Douple x=-3.5,y=3.5;
printf(“%.0f : % 0f \n”,ceil(x),ceil(y));

printf(“%.0f : % 0f \n”,floor(x),floor(y));
Debugging Answer:
-4:4
-3:3
Debugging Solution:
Ceil function it will perform the round up increment
floor function it will perform the round up decrement

0 comments: