Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Objective: by the end of the experiment the student should be able to use if statements that include several conditions Task: Write a simple program

image text in transcribed

Objective: by the end of the experiment the student should be able to use if statements that include several conditions Task: Write a simple program based on the use of IF statements to show the number of days in each month. You need to ask the user to enter the number of the month (i.e., 1,2,3, 4....12) and based on that you need to output the result as following: The number of days for month (number of the month) is 30. Or The number of days for month (number of the month) is 31. Or The number of days for month (number of the month) is 28. Or In case the user entered a number other than 1 - 12 print: Not a valid number Remember: Jan, March, May, July, August, October and December have 31 Days April, June, September and November have 30 days February has 28 Days. Bonus: The output should be as following: The number of days for (name of the month) is 30. Or The number of days for (name of the month) is 31. Or The number of days for (name of the month) is 28

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

DB2 11 The Ultimate Database For Cloud Analytics And Mobile

Authors: John Campbell, Chris Crone, Gareth Jones, Surekha Parekh, Jay Yothers

1st Edition

1583474013, 978-1583474013

More Books

Students also viewed these Databases questions

Question

Have roles been defined and assigned?

Answered: 1 week ago