Java编写收银柜台1.0
public static void main(String[] args) {
Scanner input= new Scanner(System.in);
System.out.println("商品单价:");
double danjia=input.nextDouble();
System.out.println("数量:");
int shuliang=input.nextInt();
double yingshou=danjia*shuliang;
System.out.println("应收金额:"+yingshou);
System.out.println("收钱:");
double shouqian=input.nextDouble();
double zhaoqian=shouqian-yingshou;
System.out.println("找零:"+zhaoqian);
}
2020.3.31