Get a square root without using sqrt function in c++ | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Get a square root without using sqrt function in c++

How do I do this?

12th Dec 2017, 8:09 AM
Djordje Zivkovic
Djordje Zivkovic - avatar
9 Answers
12th Dec 2017, 8:53 AM
David Akhihiero
David Akhihiero - avatar
+ 7
Technically speaking pow(x, 0.5) is a square root function
12th Dec 2017, 8:19 AM
David Akhihiero
David Akhihiero - avatar
+ 6
Homework?
12th Dec 2017, 8:12 AM
David Akhihiero
David Akhihiero - avatar
+ 1
// Try this int x = 16; cout << pow(x, 0.5);
12th Dec 2017, 8:13 AM
#RahulVerma
#RahulVerma - avatar
+ 1
Yeah the homework says not to use "native functions".. Have no idea exactly what is supposed to not be used.
12th Dec 2017, 8:22 AM
Djordje Zivkovic
Djordje Zivkovic - avatar
+ 1
Thank you so much!
12th Dec 2017, 9:38 AM
Djordje Zivkovic
Djordje Zivkovic - avatar
0
Yeah..
12th Dec 2017, 8:13 AM
Djordje Zivkovic
Djordje Zivkovic - avatar
0
Thanks I will test it out.
12th Dec 2017, 8:16 AM
Djordje Zivkovic
Djordje Zivkovic - avatar