Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
193 B
1
Indexable
Never
#include <iostream>
using namespace std;

int main()
{
	float n;
	cin >> n;
	if ((n - (int)n) < 0.5) {
		cout << (int)n;
	}
	if ((n - (int)n) >= 0.5) {
		cout << (int)n + 1;
	}
}
Leave a Comment