冷饮的价格(2)
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
【题目描述】
小明夏天去买冰棍,老板说买30 个及以上1 元/ 个, 20∼29 个 1.2 元 / 个,10∼19 个1.5 元 / 个, 10 个以下1.8 元 / 个!
请从键盘读入小明买冰棍的数量,计算小明应该付的价格(价格保留 1 位小数)!
【输入格式】
一个整数 n 代表小明购买的冰棍的数量。
【输出格式】
小明应付的金额。
【样例数据】
30
30.0
26春少科院七年级第一次作业——多分支
- Status
- Done
- Problem
- 15
- Open Since
- 2026-4-11 0:00
- Deadline
- 2026-4-26 23:59
- Extension
- 24 hour(s)