i found a challenge where a pow was added. what is this pow? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

i found a challenge where a pow was added. what is this pow?

20th Jul 2020, 5:33 AM
Zihan Sabah
Zihan Sabah - avatar
3 Answers
+ 3
pow() is a function in C/C++ defined in <math> header which is used to calculate power of a number For example pow(2,3) is same as 2^3 in maths pow(2,3) == 2*2*2 == 8
20th Jul 2020, 5:35 AM
Arsenic
Arsenic - avatar
+ 3
Samsil Arefeen it's not necessary to use <cmath> header file, you can also use good old <math.h> header file in C++. The main difference between them is <cmath> defines symbols in theĀ stdĀ namespace, and may also define symbols in the global namespace whereas <math.h> defines symbols in the global namespace, and may also define symbols in theĀ stdĀ namespace. take this for examplešŸ‘‡ https://code.sololearn.com/cV94WiY32z37/?ref=app
20th Jul 2020, 5:54 AM
Arsenic
Arsenic - avatar
+ 1
Thanks Arsenic. I didn't know that.
20th Jul 2020, 6:01 AM
The future is now thanks to science
The future is now thanks to science - avatar