Question: 2) Pseudo code 1. Write the selection statements within the pseudo code below in order to complete the pseudo code. A Hotel uses the following

2) Pseudo code

1. Write the selection statements within the pseudo code below in order to complete the pseudo code.

A Hotel uses the following procedure to determine the total charges:

Room Type: 1 Single $30 per day/$195 per week

2 Double $45 per day/$285 per week

3 King $55 per day/$350 per week

Meals:

A One meal $5/day

B Two meals $7/day

D Three meals $15/day

N Nothing $0/day

Input (from user):

Room Type (1, 2, or 3) Rent code - (1 = Daily or 2 = Weekly) Number of days - (set to 0 if rented by the week. Customers cannot rent for more than 1 week.)

Meal code - (A, B, D, or N Customer may only select one code for all days or week)

Output:

Customers Total Bill

Note that there is no need to validate the input.

Complete the Pseudo code here to include the proper selection statement:

DEFINE integer roomType = 0

DEFINE STRING mealCode = N

DEFINE integer rentCode = 0

DEFINE integer numDays = 0

DEFINE integer bill = 0

DISPLAY Please enter the type of room (1-Single, 2-Double, 3-King):

GET roomType

DISPLAY Please enter the rent code (1-Daily, 2-Weekly):

GET rentCode

DISPLAY Please enter the number of days rented (0 if rented by the Weekly):

GET numDays

DISPLAY Please select a meal. (A One meal, B Two meals, D Three meals, or N Nothing)

GET mealCode

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!