class Demo{public static void main (String[]args){int x = 6;if (x>12 || x=3&&x=6&&x=9&&
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/17 01:48:04
classDemo{publicstaticvoidmain(String[]args){intx=6;if(x>12||x=3&&x=6&&x=9&&classDemo{publicstaticvo
class Demo{public static void main (String[]args){int x = 6;if (x>12 || x=3&&x=6&&x=9&&
class Demo
{
public static void main (String[]args)
{
int x = 6;
if (x>12 || x=3&&x=6&&x=9&&
class Demo{public static void main (String[]args){int x = 6;if (x>12 || x=3&&x=6&&x=9&&
class Demo
{
public static void main (String[]args)
{
int x = 6;
if (x>12 || x<1)
System.out.println(x+"月份不存在");//分号打成了中文字符,去掉大括号
else if (x>=3&&x<=5)
System.out.println(x+"春季");
else if (x>=6&&x<=8)
System.out.println(x+"夏季");
else if (x>=9&&x<=11)//应该是else if
System.out.println(x+"秋季");
else //else后面不跟判断语句
System.out.println(x+"冬季");
}
}
错误好多.