import java.io.*;
public class test {
public static void main(String args[]) {
String str;
InputStreamReader stdin = new InputStreamReader(System.in);//键盘输入
BufferedReader bufin = new BufferedReader(stdin);
try{
System.out.print( "请输入字符:");
str = bufin.readLine();
switch (Integer.parseInt(str)) {
case 1:
System.out.print( "该季节为春季");
break;
case 2:
System.out.print( "该季节为春季");
break;
case 3:
System.out.print( "该季节为春季");
break;
case 4:
System.out.print( "该季节为夏季");
break;
case 5:
System.out.print( "该季节为夏季");
break;
case 6:
System.out.print( "该季节为夏季");
break;
case 7:
System.out.print( "该季节为秋季");
break;
case 8:
System.out.print( "该季节为秋季");
break;
case 9:
System.out.print( "该季节为秋季");
break;
case 10:
System.out.print( "该季节为冬季");
break;
case 11:
System.out.print( "该季节为冬季");
break;
case 12:
System.out.print( "该季节为冬季");
break;
default:
break;
}
}catch(IOException e) {
}
}
}
解析看不懂?求助智能家教解答查看解答