Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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++ Interview Questions

What is the difference between creating an object, using 'new' and using 'malloc'?

3 Answers   HFG, Siemens,


What is a virtual base class?

6 Answers   Fidelity, Siemens,


What are Agilent PRECOMPILERS?

0 Answers   Agilent,


What is placement new?

1 Answers   Amazon,


What does it mean to declare a member function as static in C++?

0 Answers   Amazon,


Write a C++ Program to Find whether given Number is Odd or Even.

1 Answers  


What are the advantages and disadvantages of B-star trees over Binary trees?

0 Answers  


Define namespace.

1 Answers  


When must you use a constructor initializer list?

0 Answers   Amazon,


Tell us the size of a float variable.

0 Answers   Accenture,


What is the difference between virtual functions and pure virtual functions?

1 Answers  


What is static variable and difference between(const char *p,char const *p,const char* const p).

0 Answers   Accenture,


Categories