Square Root In Dev C++

Posted on by
Square Root In Dev C++ Average ratng: 9,2/10 3623 votes
Dev

Find Square Root

Buddy, maybe you can use this program:
...........................................................................
#include<iostream>
#include'conio.h'
#include 'math.h' //used for the (pow) function
using namespace std;
int main( );
{ unsigned long int a; //number
long int b; //power
long int c; //exponent (answer)
cout<<'enter a number' <<endl;
cin>>a;
cout<<'enter the power to raise by' <<endl;
cin>>b;
c=pow(a,b); //computer equivalent of a b
cout<<'the answer is' <<c;
_getch( );
}
.......................................................................
Using 'unsigned long int' gives you more space to store your number, so you can both enter and receive extremely large numbers (till about 14 billion!).
But please note that the program has been written for Microsoft Visual Studio 2010 Ultimate.
If you are using some other compiler, just make the required changes.
By the way, there is no need for a loop as you only need to perform a single operation.
Let me know if it works.
Cheers.

Jul 04, 2016  In this Example we will learn how to find the square root of a given number using C. Fl autotune vst download. In the first example we are going to use std::pow function to calculate the square root. I am having problems using the square root function in my program. I have included outside of main and my formula using the square. Auto tune swing music. Log In Sign Up Read Contribute Search. Forum Categories. Using square root in dev C Home. Programming Forum.

C++ Square Root Function

Root

How To Write Square Root In Dev C++

  • The cmath header defines two more inbuilt functions for calculating square root of a number (apart from sqrt which takes double as an arguement) which has an ar sqrt, sqrtl and sqrtf in C The cmath header defines two more inbuilt functions for calculating square root of a number (apart from sqrt which takes double as an arguement) which has.
  • The sqrt function computes the non-negative square root of x, i.e sqrt(x) For complex numbers x, sqrt returns the complex root of x, using the following formula where is the argument of x. Example - Square root function. C only; sqrtl.