- 博客(1)
- 收藏
- 关注
原创 铁路托运行李规定:行李重不超过50公斤的,托运费按每公斤0.15元计费;如超过50公斤,超过部分每公斤加收0.10元。编一程序实现自动计费功能。
package lianXiTi;import java.util.Scanner;public class Shi_er02 { public static void main(String[] args) { System.out.println("请输入行李的重量:"); Scanner sc=new Scanner(System.in); int weight=sc.nextInt(); double total=0; if(weight<=50) { total
2020-05-23 15:04:05 10194
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人