Program to find square root of any number
#include<stdio.h>
#include<math.h>
int main()
{
float a,s;
printf("Enter the number\n");
scanf("%f",&a);
s=sqrt(a);
printf("Square root of the number=%f",s);
}
OUTPUT
Enter the number
9
Square root of the number=3.000000
In this program we calculate only square root of any number by using sqrt function.
The main use of this function is in calculating roots of quardetic equation.
If you like this program then you can share it and for any issues you can direct contact with me from Home Page.
For regular updates you can also follow my site.
Comments
Post a Comment