Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write the selection statement within the pseudo code below in order to complete

ID: 3772805 • Letter: W

Question

Write the selection statement within the pseudo code below in order to complete the pseudo code. A rental car company uses the following procedure to determine the total charges: Car type 1-compact $30 per/$195 per week 2-medium sized $45 day/$285 per week 3-Luxury $55 per day/$350 per week Input (from user): Car 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.) Output: customer's Total Bill Note that there is no need to validate the input. Complete the pseudo code here to include the proper selection statement: integer car Type =0 integer rent Code =0 integer numDays =0 integer bill =0 output "Please enter the type of car (1-Compact, 2_Medium, #-Luxury)." input carType output "Please enter the rent code (1-Daily, 2-weekly)." input rentCode output "Please enter the number of days rented (0 if rented by the Weekly)." input numDays

Explanation / Answer

if carType = 1 then
   if rentCode = 1 then
       rent = 30
   else
       rent = 195
   end if
else if carType = 2
   if rentCode = 1 then
       rent = 45
   else
       rent = 285
   end if
els if carType =3
   if rentCode = 1 then
       rent = 55
   else
       rent = 350
   end if
end if

bill = rent *numdays