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