Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- public class season
- {
- public static void main(String args[])
- {
- Scanner s = new Scanner(System.in);
- System.out.println("Enter Month number : ");
- int month = s.nextInt();
- if(month <= 4 && month >= 1)
- {
- System.out.println("Season is Summer" );
- }
- else if( month <= 8 && month >= 5)
- {
- System.out.println("Season is Monsoon" );
- }
- else if( month <= 12 && month >= 9)
- {
- System.out.println("Season is Monsoon" );
- }
- else{
- System.out.println("Select month number between 1 to 12");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment