d

王坦  •  4年前


#include<iostream> 
#include<cstdio> 
using namespace std; 
int main() 

double x; 
cin>>x; 
if(0<=x&&x<5) 

 printf("%.3lf",-x+2.5); 

else if(5<=x&&x<10) 

 printf("%.3lf",2-1.5*(x-3)*2); 
}  
else if(10<=x&&x<20) 

 printf("%.3lf",x/2-1.5); 

return 0; 
}


评论:

好人


万正钰  •  1年前

谢谢


许铭锐  •  1年前