#include<iostream>main(){ float s; float cost; printf("请输入里程 \n"); scanf("%f \n",&s); if(s<0) printf("输入错误 \n") else if(s>=0 and s<2) cost=2 else if(s>2) cost=7+2*(x-2) printf("价钱是%.3f \n"); system("pause");}