Program to find square root of any number

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

Popular posts

Creative pattern of butterfly in C-language

Program to show present time and date in C-language

Introduction of C-language.

Program to cheque enter number is a perfect number or not using if else in C-language

Program to cheque four digits number is palindrome or not in C-language

Program to print the cube of a number in c-language

Simple Hello world program in c- language