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 programe to calculate the simple intrest and compund intrest using by function overlading
What are pointer-to-members? Explain.
Write a Program for dynamically intialize a 2 dimentional array. Eg:5x20, accept strings and check for vowels and display the no.finally free the space allocated .
Explain selection sorting?
Is c# written in c++?
Why is c++ called oops?
What is a stl vector?
What is function overloading in C++?
Can you help me with this one? Make a program that when a user inputed a Product Name, it will display its price, and when the user inputed the quantity of the inputed product, it will show its total price. The output must be like this: Product Name: Price: Quantity: Total Price: ..this is the list of products to be inputed: Cellphone - 1500 Washing Machine - 5200 Television - 6000 Refrigirator - 8000 Oven - 2000 Computer - 11000 thanks..:D
Explain the register storage classes in c++.
What is a rooted hierarchy?
If class D is derived from a base class B
State the difference between pre and post increment/decrement operations.
Explain bubble sorting.
What is the basic structure of a c++ program?