Playground
#include <iostream> #include <cmath> using namespace std; int main() { double x = 3.0, y = 2.7; cout << pow(2.0, 3.0) << endl; //pechati '8' cout << sqrt(4) << endl; //pechati '2' cout << fabs(-7.123) << endl; //pechati '7.123' cout << log(x) << endl; //pechati '1.09861' cout << log10(x) << endl; //pechati '0.477121' cout << floor(y) << endl; //pechati '2' cout << ceil(y) << endl; //pechati '3' return 0; }
Input data
Program output
no input
Execute
Language: ????????? | Memory: ???? KB | Time: ??? ms
Nothing has been executed, yet!