import java.util.Scanner;
public class AwardDemo {
private static Scanner sc;
public static void main(String[] args) {
sc = new Scanner(System.in);
System.out.println("请输入名次1-6");
int y=sc.nextInt();
System.out.println(" 金曲奖第"+y+"名是:"+award(y));
}
public static String award(int a){
String[] arr={" ","刘德华","张学友","陈奕迅","周杰伦","林俊杰","邓紫棋"};
return arr[a];
}
}
|
|