class Demo{public static void main (String[]args){int x = 6;if (x>12 || x=3&&x=6&&x=9&&
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/05 20:47:31
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+"冬季");
}
}
错误好多.