Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


Write a C++ Program to find Square Root of a number using sqrt() function.



Write a C++ Program to find Square Root of a number using sqrt() function...

Answer / hr

Solution:
/* C++ Program to find Square Root of a number using sqrt() function */
#include<iostream>
#include<math.h>
using namespace std;
int main()
{
float sq,n;
cout<<"Enter any positive number :: ";
cin>>n;
sq=sqrt(n);
cout<<"
Square root of Entered Number [ "<<n<<" ] is :: "<<sq<<"
";
return 0;
}
Output:
/* C++ Program to find SquareRoot of a number using sqrt() function */
Enter any positive number :: 10000
Square root of Entered Number [ 10000 ] is :: 100
Process returned 0

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

Is map ordered c++?

0 Answers  


What is the difference between global int and static int declaration?

0 Answers  


What are separators in c++?

0 Answers  


What is size of a object of following class? class Foo { public: void foo(){} }

2 Answers   CA,


What language is a dll written in?

0 Answers  






What's c++ used for?

0 Answers  


What is pair in c++?

0 Answers  


How to access a variable of the structure?

0 Answers  


Differentiate between C and C++.

0 Answers   Wipro,


Who invented turbo c++?

0 Answers  


What is the difference between interpreters and compilers?

0 Answers  


the maximum length of a character constant can be a) 2 b) 1 c) 8

0 Answers  


Categories