刘雨勋 • 3个月前
using namespace std ; int main() { double p,w,d,f,s; int s1; cin>>p>>w>>s; s1=s/250; switch(s1) { case 0:d=0;break; case 1:d=0.02;break; case 2:d=0.05;break; case 3:d=0.05;break; case 4:d=0.08;break; case 5:d=0.08;break; case 6:d=0.08;break; case 7:d=0.08;break; case 8:d=0.1;break; case 9:d=0.1;break; case 10:d=0.1;break; case 11:d=0.1;break; case 12:d=0.15;break; default:d=0.15;break; } f=pws*(1-d); cout<<fixed<<setprecision(2)<<f; }
评论: