-moz-user-select:none; -webkit-user-select:none; -khtml-user-select:none; -ms-user-select:none; user-select:none;

Sunday 8 March 2015

Square root of a number entered by user

In this blog, I will tell you how to make a program that inputs a number from the user and then calculates its square root.

#include<iostream.h>
#include<conio.h>
#include<math.h>
void main( )
{
int a,b;
cout<<"Enter any number=";
cin>>a;
b=sqrt(a);
cout<<"The square root="<<b;
getch( );
}

 Output



No comments:

Post a Comment