WA:
cout<<setprecision(2)<<BMR<<endl;
C++會輸出科學符號
ans:7.7e+02
AC:
printf("%.2lf\n",BMR);
C會輸出浮點數
ans:770.00
WA:
cout<
C++會輸出科學符號
ans:7.7e+02
AC:
printf("%.2lf\n",BMR);
C會輸出浮點數
ans:770.00
you clearly don't know how to use setprecision
cout << fixed << setprecision << BMR << "\n";
WA:
cout<
C++會輸出科學符號
ans:7.7e+02
AC:
printf("%.2lf\n",BMR);
C會輸出浮點數
ans:770.00you clearly don't know how to use setprecision
cout << fixed << setprecision << BMR << "\n";
cout << fixed << setprecision(2) << BMR << "\n";
WA:
cout<
C++會輸出科學符號
ans:7.7e+02
AC:
printf("%.2lf\n",BMR);
C會輸出浮點數
ans:770.00
要fixed