Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is based on chapter 8 #20 Matlab for Engineers by Holly Moore 5th edition. Most Major airports have separate lots for long term an

This is based on chapter 8 #20 Matlab for Engineers by Holly Moore 5th edition.

Most Major airports have separate lots for long term an dshort -term parking. The cost to park depends on the logt you select, and how long you stay. Consider this rate structure from the Salt Lake International Airport during the summer of 2016.

Long-term (Economy) Parking

- The first hour is $2.00, and each additional hour or fraction thereof is $1.00

-Daily Maximum $9.00

-Weekly maximum $60.00

Short-term Parking

-The first 30 minutes are $2.00 and each additional 20 minutes or fractoin thereof is $1.00

- Daily maximum $32.00

Write a program that asks the user the following:

- Which lot are you using?

-How many weeks, hours, days, and minutes did you park? Your program should then calculate the parking bill.

You need to prompt the user and get input such as lot number, weeks, days, hours, and minutes from user

Example of the prompts as follow, after each prompt you need to get user input:

Enter 1 for long term or 2 for short term parking

Following prompts may depend on whether the user chose short term or long term parking How many complete weeks did you park? How many additional complete days did you park? How many additional complete hours did you park? How many additional minutes did you park?

Test cases:

Only positive integers will be used to test your program.

After user completes the required information, your program should tell the user how much is the cost.

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

Pro SQL Server Wait Statistics

Authors: Enrico Van De Laar

1st Edition

1484211391, 9781484211397

More Books

Students also viewed these Databases questions