16G_Ayin @ 2023-10-21 21:15:38
by Lesiris @ 2023-10-21 21:27:05
cout<<fixed<<setprecision(1)<<ansa/a<<" "<<fixed<<setprecision(1)<<ansb/b;
by leiwusi @ 2023-10-21 21:27:53
printf(".xf",double) // x为小数位数
by Ssim_on_wxs @ 2023-10-21 21:30:37
cout<<fixed<<setprecision(x)<<(这里是要保留小数的原数);
x为小数位数
by witherbogged @ 2023-11-01 20:56:20
保留1位:%.1lf 保留2位:%.2lf 公式:%.nlf //n为小数位数