cmath库

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
/******************************************************************************
cmath Library
*******************************************************************************/
#include <iostream>
#include <cmath>
using namespace std;

int main(){
    cout<<"abs(-8)="<<abs(-8)<<endl;
    cout<<"ceil(3.14)="<<ceil(3.14)<<endl;
    cout<<"floor(3.14)="<<floor(3.14)<<endl;
    cout<<"4^3="<<pow(4,3)<<endl;
    cout<<"sqrt(9)="<<sqrt(9)<<endl;
    
}
Scroll to Top