HTML Tutorial || Networking Assignment || Computer Full Forms || Ms-Office Shortcut Keys || Ms-Office Notes || Number System Notes || Internet Assignment
JavaScript Tutorial || CSS Tutorial || Operating System Notes || History of Computer Assignment || Netwoking Notes || Computer Fundamentals Notes

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