#include <stdio.h> int main(){ float amount; float result; if (scanf("%f",&amount)!=0){ if (amount>15.0){ result = 2.5*amount-17.5; printf("%.2f",result); }else{ result = 4*amount/3.0; printf("%.2f",result); } }else{ printf("输入数据存在错误"); } return 0; }