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 
  1. This the header file is associated with mathematical operation.
  2. It contains definition of various mathematical functions.
  3. It contains following in built function:
  • Abs()
  • Pow()
  • Sqrt()
  • exp()

You may also like...

Leave a Reply