+ 7

CHALLENGE

I challenge you to write a program calculate the square root without use "scrt" function.

7th Nov 2017, 7:23 AM
Coder++
Coder++ - avatar
4 Answers
+ 13
print(int(input())**0.5) #Python
7th Nov 2017, 7:50 AM
šŸ‘‘ Prometheus šŸ‡øšŸ‡¬
šŸ‘‘ Prometheus šŸ‡øšŸ‡¬ - avatar
+ 6
#include <iostream> #include <cmath> int mysqrt(int n) { return pow(n, 0.5); } int main() { int num = 144; std::cout << "Square root of " << num << " = " << mysqrt(num); return 0; }
7th Nov 2017, 7:45 AM
Ipang
+ 5
you only need to know how sqrt works or his formula, all the rest will be easy.
7th Nov 2017, 7:33 AM
Cain Eviatar
Cain Eviatar - avatar
+ 5
Without using any math functions, no sqrt or pow functions. https://code.sololearn.com/WEGfbB4jnO3Q/?ref=app
7th Nov 2017, 10:51 AM
CalviÕ²
CalviÕ² - avatar