Apartments 101 through 110 are on the first floor


Problem

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

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Apartments 101 through 110 are on the first floor
Reference No:- TGS02897343

Expected delivery within 24 Hours