Blame view

P92613_en/S002-AC.cc 303 Bytes
Imanol-Mikel Barba Sabariego authored
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <iostream>

using namespace std;

int main()
{
	double x;
	cin >> x;

	cout << (int)x << " ";
	if(x - (int)x)
	{
		cout <<  (int)x + 1 << " ";
	}
	else
	{
		cout << (int)x << " ";
	}

	if(x - (int)x >= 0.5)
	{
		cout << (int)x +1 << endl;
	}
	else
	{
		cout << (int)x << endl;
	}

	return 0;
}