#include<stdio.h> double round(double x) { return (int)(x+0.5); } int main() { double x=1.6483; printf("%.2lf",round(x*100)/100);//保留两位小数 return 0; }