package com.zhangyuwei.java;
import java.util.Scanner;
public class zyww {
public static void main(String[] args) {
Scanner tixue=new Scanner([(image-57ba15-1619621740493)]
System.in);
System.out.println("请输入T恤个数");
Scanner wangqiuxie=new Scanner([(image-155a92-1619621740493)]
System.in);
System.out.println("请输入网球鞋个数");
Scanner wangqiupai=new Scanner([(image-ab911b-1619621740493)]
System.in);
System.out.println("请输入网球拍个数");
int tixueshuliang=tixue.nextInt();
int paishuliang=wangqiupai.nextInt();
int xieshuliang=wangqiuxie.nextInt();
int tixue1=245;
int wangqiuxie1=570;
int wangqiupai1=320;
int tixueMony=tixue1*tixueshuliang;
int wangqiuxieMony=wangqiuxie1*xieshuliang;
int wangqiupaiMony=wangqiuxie1*paishuliang;
double zje=(tixueMony+wangqiuxieMony+wangqiupaiMony)*0.8;
int sjjf=2000;
double zq=sjjf-zje;
System.out.println("* * * * * * * *消费单* * * * * * * *");
System.out.println("购买物品\t单价\t个数\t金额");
System.out.print("T恤\t"+tixue1);
System.out.print("\t"+tixueshuliang);
System.out.println("\t¥"+tixueMony);
System.out.print("网球鞋\t"+wangqiuxie1);
System.out.print("\t"+xieshuliang);
System.out.println("\t¥"+wangqiuxieMony);
System.out.print("网球拍\t"+wangqiupai1);
System.out.print("\t"+paishuliang);
System.out.println("\t¥"+wangqiupaiMony);
System.out.println("\n折扣\t8折");
System.out.println("消费总金额\t"+zje);
System.out.println("实际交费\t"+sjjf);
System.out.println("找钱\t"+zq);
System.out.println("本次购物所得积分为:139");
System.out.println("* * * * * * * * * * * * * * * * * * * * * *");
}
}
2021-04-28
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...