#include <stdio.h> int main(void) { float input; scanf("%f",&input); //注意下这个地方不带\n printf("%d\n",(int)(input+0.5)); //因为比较和0.5的差距 加上取整数 return 0; }