package com.company;
import java.util.Scanner;
public class demo1 {
public static void main(String[] args) {
System.out.println("请输入消费金额");
Scanner scanner = new Scanner(System.in);
int xiaofei = scanner.nextInt();
if (xiaofei == 50 ) {
System.out.println("加2元可换购百事可乐饮料1瓶");
}
if (xiaofei == 100 ) {
System.out.println("加3元可换购500ml可乐一瓶");
}
if (xiaofei == 100 ){
System.out.println("加10元可换购5公斤面粉");
}
if (xiaofei == 200 ) {
System.out.println("加10元可换购1个苏泊尔炒菜锅");
}
if (xiaofei == 200 ) {
System.out.println("加20元可换购欧莱雅爽肤水一瓶");
}else {
System.out.println("不换购");
}
switch (xiaofei){
case 1:
System.out.println("加2元换购百事可乐饮料1瓶");
break;
case 2:
System.out.println("加3元换购500ml可乐一瓶");
break;
case 3:
System.out.println("加10元可换购5公斤面粉");
break;
case 4:
System.out.println("加10元可换购1个苏泊尔炒菜锅");
break;
case 5:
System.out.println("加20元可换购欧莱雅爽肤水一瓶");
break;
default:
System.out.println("不换购");
}
}
}