Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 3 (20 Points) Suppose that there is a 3-story apartment building with 10 rooms on each floor. Apartments 101 through 110 are on the

Problem 3 (20 Points) Suppose that there is a 3-story apartment building with 10 rooms on each floor.

Apartments 101 through 110 are on the first floor, Apartments 201 through 210 are on the second floor, and Apartments 301 through 310 are on the third floor.

You are creating an automated greeting system, which directs visiting guests to an appropriate floor. Example session is shown below.

>> Apt Please enter an apartment number: 203 The apartment is on the second floor. >>

If the user enters an apartment numbers that does not exist, your program would return an error message.

>> Apt Please enter an apartment number: 100 Sorry, that apartment does not exit. >> Apt Please enter an apartment number: -5 Sorry, that apartment does not exit. >>

Run four different values, so that your command-window session will show cases corresponding to the first floor, second floor, third floor, or non-existing.

Submission: 1 m-file, the command window session

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

More Books

Students also viewed these Databases questions

Question

a. Do team members trust each other?

Answered: 1 week ago

Question

a. How will the leader be selected?

Answered: 1 week ago