#include<iostream.h>
#include<conio.h>
#include<math.h>
void main()
{
clrscr();
float sq,n;
cout<<" Enter a number : ";
cin>>n;
sq=sqrt(n); //to calculate square root
cout<<"\n Square root of "<<n<<" is : "<<sq;
getch();
}
Output

#include<conio.h>
#include<math.h>
void main()
{
clrscr();
float sq,n;
cout<<" Enter a number : ";
cin>>n;
sq=sqrt(n); //to calculate square root
cout<<"\n Square root of "<<n<<" is : "<<sq;
getch();
}
Output
No comments:
Post a Comment