```c #include <stdio.h> int main() { int a; char b, c; double price; scanf("%d %c %c", &a, &b, &c); switch (b) { case '90': price = 6.95; break; case '93': price = 7.44; break; case '97': price = 7.93; break; default: printf("输入的汽油品种有误\n"); return 0; } double totalPrice = a * price; if (c =='m') { totalPrice *= 0.95; } else if (c == 'e') { totalPrice *= 0.97; } else { printf("输入的服务类型有误\n"); return 0; } printf("%.2lf\n", totalPrice); return 0; } ``` [2024-11-10 19:54:14 | AI写代码神器 | 244点数解答]