Programming

C Program to Find Square Root of Entered Number

Write a c program to take input from user and calculate square root of that entered number.

C Code

#include <stdio.h>
#include <conio.h>
#include <math.h>
void main()
{
float number;

printf("Enter number:");
scanf("%f",&number);

printf("square root of entered number %f is %f",number, sqrt(number));

getch();
}

Output

Tuts

About Author

Tutsmaster.org provides tutorials related to tech and programmings. We are also setting up a community for the users and students.