Win a copy of Head First Android this week in the Android forum!

Al Jensen

Greenhorn
+ Follow
since Feb 23, 2012
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Al Jensen

This is the assigment. I believe I am only allowed to use If and else statements




> The following algorith yields the season (Spring, Summer, Fall, or
> Winter) for a given month of the day.
>
> IF month is 1,2, or 3, season = "Winter
> Else if month is 4, 5, or 6, season = "Spring"
> Else if month is 7,8, 9, season = "Summer"
> Else if month is 10,11, or 12, season = "Fall"
> If month is divisible by 3 and day >= 21
> If season is "Winter", season = "Summer"
> Else if season is "Spring", season = "Spring"
> Else if season is "Summer", season = "Fall"
> Else season = "Winter"
>
> Write a program that prompts the user for a month and day and then
> prints the season, as determined by this algorithm


Heres what I got so far. I can't get the last part to get the seasons to change if the month is divisible by 3 and day is above 20.


9 years ago