answersLogoWhite

0


Best Answer

You write a function that evaluates the square root of its argument and returns the result to the caller.

You can also use the run-time library functions in math.h ...

double sqrt (double x);

double pow (double x, (double) 0.5);

User Avatar

Wiki User

13y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

7y ago

Use the sqrt() function in the <math.h> header of the C standard library.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you find the square root of a number in C?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Solve for a c equals the square root of a squared plus b square?

This question cannot be answered. You will have to give me the number to the square root. * * * * * a = &plusmn;sqrt(c^2 - b^2)


What is the square root of c to the 2nd power?

square root of c to the second power is c


How do you find the square root of a square root?

The laws of exponents help you out here. We can write square root of a number n, as n^1/2 power. Now we know that raising and exponent to a powers is done according to the rule (a^b)^c=a^bc. That is two say we multiply the exponents So doing that with 1/2 each time we find that the square root of the square root of n is n^1/4 which is the 4th root of n Looks look at an example. let n=16 The square root is 4 and the square root of that is 2 So this means the 4th root of 16 must be 2, but 2x2x2x2=16 so it is! Using this, one can you 1/4 as the exponent on a calculator and find square roots of square roots. or you could just find the square root of the first number then find the square root of that... real simple.


What is the closest number to the square root of 54?

The closets number to the square root of 54 is &radic;54 &radic;54 = 7.348... &rarr; The closest WHOLE number to the square root of 54 is 7.


Find whether a number is prime or not using c?

It should not be even (except for 2), and must not be dividable with any odd number between 3 and its square-root.


Write a c plus plus program to find the square root of a number?

#include&lt;iostream&gt; int main() { unsigned num = 25; // or use user-input to assign the value unsigned root = sqrt ((double) num) std::cout &lt;&lt; "The square root of " &lt;&lt; num &lt;&lt; " is " &lt;&lt; root; }


Write a c program to accept a numbers and generate square root cube and exponential values?

write a c program to accept a number and generate a square root cube and exponential values


How di you find the hypontnuse if a the square root of3 and b the square root of5?

If it's a right triangle, a2 + b2 = c2 3 + 5 = c2 c = the square root of 8.


How do you calculate root sum squared?

If you have a data set, simply take the square root of the sum of the squares of the data points. Let's say you have three numbers a, b, and c. RSS = SQRT(a2 + b2 + c2).


What is the square root of c to 5th power?

This question is unclear.You could be asking for the square root of ( c5 )or alternatively for ( the square root of c )5Also are you intending for c to be as in the speed of light - if not, why not use x?


How is the square root of a number found?

Let x be the parameter to be taken square root. a = 0 b = x loop: c = (a+b)/2 if c*c &gt; x then b = c else a = c Repeat until accurate enough result is obtained in c or until c*c equals x.


If a triangles height is 36 and the base is 12 at a 90 degree angle. what is the length of the third side?

In order to solve this equation you will use the Pathagorean Theorem. [(A^2+B^2=C^2) "^2" being square root] Here are the steps to solve for C with A=36 and B=12; A^2+B^2=C^2Now let's solve for C... C=(square root of) A^2+B^2 Then we enter in our known values... C=(square root of) 36^2 + 12^2Next we square 36 and 12, giving us 1,296 and 144... C=(square root of) 1,296+144 Almost there! Now add the two numbers and find the square root using your scientific calculator. C=(square root of) 1,440 which is... C=37.94733 And there you have it. Your missing side is 37.95 (rounded). I hope you found this information helpful.