1#include <iostream>
2#include <cmath>
3
4using namespace std;
5
6int main()
7{
8 double num1 = 4.8;
9 double num2 = 4.3;
10 cout << ceil(num1) << endl; // --> 5
11 cout << ceil(num2) << endl; // --> 5
12}
1#include <iostream>
2#include <cmath>
3
4using namespace std;
5
6int main()
7{
8 int x = 15;
9 double result;
10 result = round(x);
11 cout << "round(" << x << ") = " << result << endl;
12
13 return 0;
14}
15