he day of the month is a number between 1 and 31. If the date falls between 16/12 and 15/3, you should print "Winter". If the date falls between 16/3 and 15/6, you should print "Spring". If the date falls between 16/6 and 15/9, you should print "Summe

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter13: Structures
Section13.2: Arrays Of Structures
Problem 3E
icon
Related questions
icon
Concept explainers
Question

Write a c++ code using if else that takes two integers as input representing a month and day and prints the season for
that month and day. Assume that months are specified as an integer between 1 and 12 (1 for January, 2
for February, and so on) and that the day of the month is a number between 1 and 31. If the date falls
between 16/12 and 15/3, you should print "Winter". If the date falls between 16/3 and 15/6, you should
print "Spring". If the date falls between 16/6 and 15/9, you should print "Summer". And if the date falls
between 16/9 and 15/12, you should print "Fall".

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Control Structure
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning