长河君 · 2026/10/27 10:16:38 · 阅读 1.2k 程序设计基础第二次作业1——小卖部,手里有固定现金 200 元。用户输入商品售价,程序计算应该找给顾客多少钱,打印输出找零。 编程 深度解析 一条长河 #includestdio.h#includestdlib.hintmain(){constintMONEYHAVE200;intprice_goods;intmoney_change;scanf(%d,price_goods);money_changeMONEYHAVE-price_goods;printf(找零:%d元\n,money_change);return0;} 分享: 返回资讯列表 ← 上一篇 暂无更多 下一篇 → 暂无更多