Untitled
unknown
c_cpp
2 years ago
230 B
4
Indexable
#include <iostream>
using namespace std;
int main()
{
    float a;
    float b;
    cin >> a;
    b = a - (int)a;
    if (b >= 0.5) {
        cout << (int)a + 1;
    }
    else {
        cout << int(a);
    }
}Editor is loading...
Leave a Comment