C Program to Enter any Number and Calculate its Square Root ?
Q:- Write a C Program Enter any Number and Calculate its Square Root ?
Input
#include<stdio.h>
#include<conio.h>
#include<math.h>
int main()
{
float num,result;
clrscr();
printf(“Enter a Number=”);
scanf(“%f”,&num);
result=sqrt(num);
printf(“Square Root of %f=%.2f”,num,result);
getch();
}
Output
Enter a Number = 144
Square Root of 144.00 = 12.00
Comments
Post a Comment