Untitled

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

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