Untitled

mail@pastecode.io avatar
unknown
c_cpp
7 months ago
259 B
0
Indexable
Never
#include <iostream>
using namespace std;
int main()
{
	double x;
	cin >> x;
	int celayachast = x; 
	double drobnayachast = x - celayachast; 
	if (drobnayachast >= 0.5) 
	{
		cout << celayachast + 1;
	}
	else {
		cout << int(x);
	}
	return 0;
}
Leave a Comment