-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMATH.c
More file actions
19 lines (15 loc) · 731 Bytes
/
MATH.c
File metadata and controls
19 lines (15 loc) · 731 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
printf(" pow(2,3) = %f\n", pow(2,3)); /// Power 2^3 gives output in floats.
printf(" sqrt(25)) = %f\n", sqrt(25)); /// Square Root
printf(" ceil(25.8976)) = %f\n", ceil(25.8976)); /// Rounded off to next highest number.
printf(" ceil(25.11111)) = %f\n", ceil(25.11111)); /// Rounded off to next highest number.
printf(" floor(25.8976)) = %f\n", floor(25.8976)); /// Rounded off to previous highest number.
printf(" floor(25.11111)) = %f\n", floor(25.11111)); /// Rounded off to previous highest number.
printf(" Learn about more C math functions\n");
/// Learn about more C math functions.
return 0;
}