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

Introduction of C-language.

Variable & Datatype for C-programming

Program to see all ASCII value using for loop in C-language

Language Translator of C-language

Errors in C-language

Binary searching in C-language

Addition of two numbers in c language

Program to input an array elements and then display the same array in C-language