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 << floor(num1) << endl; // --> 4
11 cout << floor(num2) << endl; // --> 4
12}
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}