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

Variable & Datatype for C-programming

Addition of two numbers in c language

Introduction of C-language.

Linear search in C-language

Language Translator of C-language

Program to cheque enter number is even or odd in c-language

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