Untitled

mail@pastecode.io avatar
unknown
c_cpp
7 months ago
313 B
1
Indexable
Never
#include <iostream>
using namespace std;
int main() 
{
    double n;
    cin >> n;

    int celayachast = n;
    double drobnayachast = n - celayachast;

    if (drobnayachast < 0.5)
    {
        cout << celayachast;
    }
    else 
    {
        cout << celayachast + 1;
    }
    return 0;
}
Leave a Comment