Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Objectives: After completing this lab, you will be able to: 1. Use selection in a program. 2. Apply nested if statement. 3. Apply the switch

image text in transcribed

Objectives: After completing this lab, you will be able to: 1. Use selection in a program. 2. Apply nested if statement. 3. Apply the switch statement. Exercise 1: Which time of year? (use switch) Write a program that inputs the month number. Then the program shows one of the following messages: Input Message Month is 12-2 Winter time Month is 9-11 Autumn time Month is 6-8 Summer time Month is 3-5 Spring time In addition, if the month is 4, then show the message: "Ramadan starts in April this year.". Sample input/output: Enter a month number: Hello ... This is summer time... Enter a month number: 4 Hello ... This is spring time... Ramadan starts in April this year

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

Hands-On Database

Authors: Steve Conger

2nd Edition

0133024415, 978-0133024418

More Books

Students also viewed these Databases questions

Question

How wide are Salary Structure Ranges?

Answered: 1 week ago