基础JAVA程序:根据月份区分淡旺季,根据年龄输出票价。但是编译提示4条错误,分别是4行和6行需要标识符。找了1个小时,无果,遂问,谢谢
```java
import java.util.Scanner;
public class Ticket01{
Scanner myScanner = new Scanner(System.in);
System.out.println("请输入月份");
int month = myScanner.nextInt();
System.out.println("请输入年龄");
int age = myScanner.nextInt();
public static void main(String[] args){
if(month >= 4 || month <= 10){
if(age >= 18 && age <= 60){
System.out.println("票价为60");
}else if(age <18 && age >0){
System.out.println("票价为30");
}else if(age >60 && age <=100){
System.out.println("票价为20");
}else System.out.println("年龄输入有误");
}
else if ((month >= 1 && month <= 3) || (month >= 11 && month <= 12 )){
if(age >= 18 && age <= 60){
System.out.println("票价为60");
}else if(age >60 && age <= 100){
System.out.println("票价为20");
}else System.out.println("年龄输入有误");
}
}
}
![img](https://img-mid.csdnimg.cn/release/static/image/mid/ask/655430542896191.png "#left")