0
How to use Maths functions ?
[ C ++ ]
2 Answers
+ 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;
}
+ 1
thanks ;)