import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner in = new Scanner(System.in);
int x, j = 1;
x = in.nextInt();
switch (x) {
case 1:
j++;
break;
case 2:
j++;
break;
case 3:
j = x*j;
break;
case 4:
j= x + j;
break;
case 5:
j = x - j;
break;
default:
j = x;
}
System.out.println(j);
}
}
Java7-7 程序改错题1
最新推荐文章于 2024-07-14 09:15:37 发布