华为题库 HJ7 取近似值

HJ7 取近似值

在这里插入图片描述

#include <iostream>
using namespace std;

int main() {
    
    
   float num;
   cin>>num;

   num += 0.5;
   cout<<(int)num;
}
// 64 位输出请用 printf("%lld")

猜你喜欢

转载自blog.csdn.net/qq_44814825/article/details/130051582