java--if判断

package test_1027;

import java.util.Scanner;

public class test {

public static void main(String[] args) {
	// TODO Auto-generated method stub
	//System.out.println("a");
	
	Scanner sc = new Scanner(System.in);
	System.out.println("please:");
	int a= sc.nextInt();
	if(a >=1 && a<=3 ) {
		System.out.println("春天");
	}else if(a>=4 && a<=6 ) {
		System.out.println("夏天");
	}else if(a>=7 && a<=9 ) {
		System.out.println("秋天");
	}else if(a>=10 && a<=12 ) {
		System.out.println("冬天");
	}else {
		System.out.println("ERROR");
	}
}

}

******************************人因为有理想、梦想而变得伟大,而真正伟大就是不断努力实现理想、梦想*****************************
原文地址:https://www.cnblogs.com/cloudLi/p/13884921.html