#22216: 注意格式


jayw711kb@gmail.com (Jay Huang)


 

 

WA:

cout<<setprecision(2)<<BMR<<endl;

C++會輸出科學符號

ans:7.7e+02

 

 

AC:

printf("%.2lf\n",BMR);
C會輸出浮點數

ans:770.00
#32514: Re: 注意格式


HyperHypa (20216)


 

 

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";

#32515: Re: 注意格式


HyperHypa (20216)


 

 

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";

cout << fixed << setprecision(2) << BMR << "\n";

#32681: Re: 注意格式


yp11151203@yphs.tp.edu.tw (909-37楊子頡)


 

 

WA:

cout<

C++會輸出科學符號

ans:7.7e+02

 

 

AC:

printf("%.2lf\n",BMR);
C會輸出浮點數

ans:770.00


要fixed