package September;
import java.util.Scanner;
public class First {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
try {
System.out.println("请输入1-3之间任意一个数字:");
int num = scan.nextInt();
if(num<1||num>3) {
throw new Exception("你输入的数据有误");
}
switch (num) {
case 1:
System.out.println("C#");
break;
case 2:
System.out.println("java");
break;
default:
System.out.println("C语言");
}
}catch(Exception e) {
String str = e.getMessage();
System.out.println(str);
}finally {
System.out.println("欢迎提出建议");
}
}
}
10-01