Q:

Calculate the square root of a number using c++

0

Write a program that calculates the square root of a number

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

#include <iostream>
#include <math.h>
using namespace std;
int main(){
double number, sq;
cout<<" enter a number which you want to calculate it’s sequare root :";
cin>>number;
sq=sqrt(number);
cout<<" square root is: "<<sq;
}

 

Output:

 enter a number which you want to calculate it’s sequare root :25
 square root is: 5

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Calculate the area and perimeter of a circle using... >>
<< Find largest number between two numbers using c++...