Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Write a description of class E3 here.
- *
- * @author Kailey McNeal
- * @version 10-24-14
- * p305 #3
- */
- public class E3
- {
- public static void main(String []args)
- {
- season(1,6);
- }
- public static void season(int m, int d)
- {
- if(m==12 && d<=16 || m<=3 && d>=15)
- {
- System.out.println("winter");
- }
- else if(m==3 && d<=16 || m<=6 && d>=15)
- {
- System.out.println("spring");
- }
- else if(m==6 && d<=16 || m<=9 && d>=15)
- {
- System.out.println("summer");
- }
- else if(m==9 && d<=16 || m<=12 && d>=15)
- {
- System.out.println("fall");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement