How to find a cube root in c++?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 8

How to find a cube root in c++??

Give relevant code

16th Dec 2020, 7:07 PM
Zaid โ›ˆ๏ธ๐Ÿ‡น๐Ÿ‡ฟ๐Ÿ‘‘
Zaid โ›ˆ๏ธ๐Ÿ‡น๐Ÿ‡ฟ๐Ÿ‘‘ - avatar
6 Answers
+ 3
Thanks, but it seems that it's not full c++, it has combination to other language
16th Dec 2020, 7:45 PM
Zaid โ›ˆ๏ธ๐Ÿ‡น๐Ÿ‡ฟ๐Ÿ‘‘
Zaid โ›ˆ๏ธ๐Ÿ‡น๐Ÿ‡ฟ๐Ÿ‘‘ - avatar
+ 5
You may use either pow() or cbrt(), but cbrt() is specialized for precision and would be a better choice. EDIT: Also, cbrt() works when you have a negative base, whereas pow() does not. It might be a more C++ oriented way to use stdc++.h which includes math.h, but I don't know if there is any difference. #include <iostream> #include <bits/stdc++.h> using namespace std; int main() { cout << pow(27.0, 1.0/3.0) << endl; cout << cbrt(27.0) << endl; return 0; }
16th Dec 2020, 8:44 PM
Brian
Brian - avatar
+ 3
Thank you for your response I'm interested in learning python but I don't know which compiler I can use for window
16th Dec 2020, 8:19 PM
Zaid โ›ˆ๏ธ๐Ÿ‡น๐Ÿ‡ฟ๐Ÿ‘‘
Zaid โ›ˆ๏ธ๐Ÿ‡น๐Ÿ‡ฟ๐Ÿ‘‘ - avatar
+ 3
Ookey is Anaconda a text-editor or interpreter
16th Dec 2020, 8:34 PM
Zaid โ›ˆ๏ธ๐Ÿ‡น๐Ÿ‡ฟ๐Ÿ‘‘
Zaid โ›ˆ๏ธ๐Ÿ‡น๐Ÿ‡ฟ๐Ÿ‘‘ - avatar
+ 3
Thank you bro
17th Dec 2020, 5:41 AM
Zaid โ›ˆ๏ธ๐Ÿ‡น๐Ÿ‡ฟ๐Ÿ‘‘
Zaid โ›ˆ๏ธ๐Ÿ‡น๐Ÿ‡ฟ๐Ÿ‘‘ - avatar
+ 1
Looking for python IDE, you might like this https://www.jetbrains.com/pycharm/
30th Sep 2021, 12:47 AM
๐Ÿ‘‘ ShadowCipher ๐Ÿ‡ฆ๐Ÿ‡ฒ
๐Ÿ‘‘ ShadowCipher ๐Ÿ‡ฆ๐Ÿ‡ฒ - avatar