2021-04-06

package edu.xcdq;

import java.util.Scanner;

public class Demo05 {

public static void main(String[] args) {

Scanner scanner = new Scanner(

System.in);

System.out.println("如果我的存款");

int score = scanner.nextInt();

if (score > 500 ) {

System.out.println("我就买凯迪拉克");

}

if (score > 100 ) {

System.out.println("我就买帕萨特");

}

if (score > 50 ) {

System.out.println("我就买依兰特");

}

if (score > 10 ) {

System.out.println("我就买奥托");

}

if (score < 10 ) {

System.out.println("我就买捷安特");

}

}

}

你可能感兴趣的:(2021-04-06)