#include <stdio.h>

int main() { int usage; double price;

printf("请输入用气量(两个月):");
scanf("%d", &usage);

if (usage <= 100) {
    price = usage * 2.58;
} else {
    price = 100 * 2.58 + (usage - 100) * 3.35;
}

printf("需交费 %.2f 元\n", price);

return 0;

}

39论述题郑州的居民燃气收费标准如下以每两个月为时间单位计算用气量第一档两个月用气量为1-100含立方米户每立方米价格为258元第一档两个月用气量为100立方米户以上每立方米价格为335元;编程输入一个周期的燃气用量 整数计算输出需交费多少钱保留两位小数例如输入150输出 39550 c语言

原文地址: https://www.cveoy.top/t/topic/fJax 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录