+ 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 odpowiedzi
+ 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