Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Programming problem: You will write a program that will read the number of a month. The program will print the number of days in the

image text in transcribed
Programming problem: You will write a program that will read the number of a month. The program will print the number of days in the month. For leap years, February may have either 28 or 29 days but pick 28 days here. The program will also use a for-loop repeat this scenario five (5) times. This program must meet the following criteria: 1. Comment statement with your name in the program 2. Ask the user to enter a month number 3. Use if or if-else statements to decide how many days are in the month entered...set a "day" equal to the number of days in the month (e.g. if they entered 2 (February) for the month, then day-28). Include an if-statement (decision) to make sure the user has entered a value for month that is between 1 and 12. 4. Send a message to the user with the month number and the number of days in that month (e.g. "Your month was 2 and it has 28 days."). 5. 6. NOTE: You will NOT have 12 or 13 individual if statements to determine the number of days in the month! For instance, multiple months have 30 days so they can be "grouped" together in an if statement. Finally, you will use a for-loop to have the program ask the user to input a month five (5) times & each time the program will state how many days are in that month. 7. 8. A calendar with month days is available at www.timeanddate.com/calendar if-statements in this program to make decisions for different paths (actions) within the Q1: You are using program. What are the paths (actions) within this program? (e.g. what are the IFsd eciding?). Q2: Sketch out your program below (e.g. list out key statements/ideas)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Strategic Database Technology Management For The Year 2000

Authors: Alan Simon

1st Edition

155860264X, 978-1558602649

More Books

Students also viewed these Databases questions