Write a C program to find square root of number.
#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
int a,b,c;
clrscr();
int number;
float square_root;
printf("Enter a number : ");
scanf("%d",&number);
square_root = sqrt(number);
printf("square root is %f",square_root);
getch();
}
Output:
Enter a number :5
square root is 2.236068
0 Comments