Social Icons

Saturday, 15 February 2014

Program to calculate square root of any number

#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



No comments:

Post a Comment