How to use Maths functions ? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

How to use Maths functions ?

[ C ++ ]

17th Apr 2017, 12:29 PM
fcbshady
fcbshady - avatar
2 ответов
+ 22
Did you mean functions like power, square root etc.? Then try the following : #include <iostream> #include <cmath> // library using namespace std; int main() { int a = 2, b = 3; cout<<sqrt(a)<<endl; cout<<pow(a,b)<<endl; return 0; }
17th Apr 2017, 12:51 PM
Shamima Yasmin
Shamima Yasmin - avatar
+ 1
thanks ;)
17th Apr 2017, 12:53 PM
fcbshady
fcbshady - avatar