Write a program that will output the square root of any number entered through the keyboard, until the inputted number, is zero.
#include<iostream>
using namespace std;
int main(){
int x;
do{
cout<<"Enter a number\n";
cin>>x;
cout<<"The square of: "<<x<<" is "<<x*x<<endl;
}while(x != 0);
}
Comments
Leave a comment