fork download
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7. cout << "Pierwiastek: " << sqrt(2) << endl;
  8. cout << "Podnoszenie do potegi: " << pow(2, 10) << endl;
  9.  
  10. cout << "Wartosc bezwgledna z liczby calkowitej: " << abs(-2) << endl;
  11. cout << "Wartosc bezwgledna z liczby rzeczywistej: " << fabs(-2.5) << endl;
  12.  
  13. cout << "Zaokraglenie w gore (sufit): " << ceil(2.3) << endl;
  14. cout << "Zaokraglenie w dol (podloga): " << floor(2.3) << endl;
  15.  
  16. return 0;
  17. }
Success #stdin #stdout 0.01s 5428KB
stdin
Standard input is empty
stdout
Pierwiastek: 1.41421
Podnoszenie do potegi: 1024
Wartosc bezwgledna z liczby calkowitej: 2
Wartosc bezwgledna z liczby rzeczywistej: 2.5
Zaokraglenie w gore (sufit): 3
Zaokraglenie w dol (podloga): 2