刷题07:HJ7

#include <iostream>
using namespace std;

int main()
{
    
    
	double num;
	cin >> num;
	int a = (int)num;
	if (num - a >= 0.5)
		cout << a + 1;
	else
		cout << a;

	return 0;
}

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_27538633/article/details/115403986