C Program to find Square root of the given number
Here is the C Program to find square root of the enter number. Here the in built function is used for that the header file math.h is included.
#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{ int n;
printf(“Enter number:”);
scanf(“%d”,&n);
printf(“Square Root of %d is %f”,n,sqrt(n));
getch();
}
Output
math.h
- This the header file is associated with mathematical operation.
- It contains definition of various mathematical functions.
- It contains following in built function:
- Abs()
- Pow()
- Sqrt()
- exp()