Write a C++ Program to find Square Root of a number using sqrt() function.
Answer Posted / 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 View All Answers
Write a Program to find the largest of 4 no using macros.
Give an example of run-time polymorphism/virtual functions.
Define pre-condition and post-condition to a member function in c++?
How do you import payscale data from non SAP to SAP?is it through LSMW or any other way is there?
When is dynamic checking necessary?
What is a tree in c++?
What is the stl, standard template library?
What is the identity function in c++? How is it useful?
C++ supports multiple inheritance. What is the “diamond problem” that can occur with multiple inheritance? Give an example.
What is c++ & why it is used?
What is the iunknown interface?
Define a constructor - what it is and how it might be called (2 methods)?
How would perform Pattern Matching in C++?
any one please tell me the purpose of operator overloading
Can I learn c++ without learning c?