package cn.save;
import java.util.Scanner;
public class Shopping {
public static void main(String[] args){
Scanner input = new Scanner(System.in);
System.out.println("请输入品名:");
String wp1=input.next();
String wp2=input.next();
String wp3=input.next();
System.out.println("请输入单价:");
double dj1=input.nextDouble();
double dj2=input.nextDouble();
double dj3=input.nextDouble();
System.out.println("请输入数量:");
int sl1=input.nextInt();
int sl2=input.nextInt();
int sl3=input.nextInt();
System.out.println("**********消费单**********");
System.out.println("购买物品"+" "+"单价"+" "+"个数"+" "+"金额");
System.out.println(wp1+" "+dj1+" "+sl1+" "+dj1*sl1);
System.out.println(wp2+" "+dj2+" "+sl2+" "+dj2*sl2);
System.out.println(wp3+" "+dj3+" "+sl3+" "+dj3*sl3);
double je1 =dj1*sl1 ;
double je2 =dj2*sl2 ;
double je3 =dj3*sl3 ;
double zje = (je1+je2+je3)*0.8;
System.out.println("折扣: 8折"+"
"+"消费总金额:"+"¥"+zje);
System.out.print("实际缴费:¥");
int sjjf = input.nextInt();
double zl = sjjf-zje;
System.out.println("找零:¥"+zl);
int jf = (int)zje/100*3;
System.out.println("本次购物所获的积分是:"+jf);
}
}