5.15

tpx041  •  11个月前


include<bits/stdc++.h>

using namespace std; int main(){

double w,s;
cin>>w;
 if(w<=10){
 	s=0.2+w*0.8;
 	cout<<fixed<<setprecision(2)<<s;
 }
 
 else if(w<=20){
 	
 	s=0.2+10*0.8+(w-10)*0.75;
 cout<<fixed<<setprecision(2)<<s;
 }
 
 else if(w<=30){
 	
 	s=0.2+10*0.75+10*0.8+(w-20)*0.7;
 	cout<<fixed<<setprecision(2)<<s;
 }
 
 if(w>30){
 	cout<<"Fail"<<endl;
 	cout<<fixed<<setprecision(2)<<s;
 }
 
 

return 0;}

评论:

你这程序fail错了,要换一个


魈凯KBS  •  4个月前