C program to compute parking fare for customers

Assignment Help C/C++ Programming
Reference no: EM1366976

Write a C program to calculate the parking fare for customers who park their cars in a parking lot when the following information is given:

a) A character showing the type of vehicle: C for car, B for bus and T for truck
b) An integer between 0 and 24 showing the hour the vehicle entered the lot
c) An integer between 0 and 60 showing the minute the vehicle entered the lot
d) An integer between 0 and 24 showing the hour the vehicle left the lot
e) An integer between 0 and 60 showing the minute the vehicle left the lot

This is a public lot. To encourage people to park for a short period of time, the management uses two different rates for each type of vehicle, as shown below:

Vehicle First Rate Second Rate
Car $0.00/hr first 3 hours $1.50/hr after 3 hours
Truck $1.00/hr first 2 hours $2.30/hr after 2 hours
Bus $2.00/hr first 1 hour $3.70/hr after 1 hour

You can assume that all vehicles will not be in the parking lot any later than midnight.

The input data consist of a character and a set of four integers representing the type of vehicle and the entering and leaving hours and minutes.

Reference no: EM1366976

Questions Cloud

Component of the health care continuum : use the information to allocate the resources and shape regulations aimed at this component of the health care continuum.
Explain diffie-helman protocol for sending message : In Diffie-Helman protocol, the common modulus is selected as n = 19 and the generator g is chosen to be 2. Alice and Bob select numbers 6 and 10 privately.
Determine the annual net cash cost of borrowing : Ron's Pharmacy has collected $600 in sales taxes during the March. If sales taxes must be remitted to state government monthly, what entry will Ron's Pharmacy create to demonstrate the March remittance?
Pay-for-performance programs : Pay-for-performance programs use financial incentives to enhance quality of health care and/or contain costs. What are the pros and cons of this approach?
C program to compute parking fare for customers : Write C program to compute parking fare for customers who park their cars in parking lot when following information is provided: A character showing type of vehicle: C for car, B for bus and T for truck
Law of supply-sunrise surf shop : Sunrise Surf Shop is willing to produce 30 surfboards in the month if it can sell each board for $300. If it can receive $500 for each board, the shop is willing to manufacture 70 surfboards.
Ethical concerns health care management : Find out what ethical concerns health care management or administrator professionals have to contend with resulting from the supply and demand of insurance.
Determining effect of subsidy : What effect will each of the following have on the supply of automobile tires?
How cost of box is evaluated in lookup table : Cost of box is determined by looking up value in a lookup table. Shipping cost also is determined by looking up value in a lookup table. Use table at cells H23:J28 with a VLOOKUP function to determine cost of a box.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd