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

Syntax of C-language

Variable & Datatype for C-programming

Language Translator of C-language

Errors in C-language

Addition of two numbers in c language

Introduction of C-language.

Linear search in C-language

Binary searching in C-language

Program to reverse one array into other array in C-language