Program that calculate and print the parking charges

Assignment Help C/C++ Programming
Reference no: EM131008044 , Length: 1

What is the program code of this problem:

A parking garage charges a $2.00 minimum fee to park for up to three hours and an additional $0.50 per hour for each hour or part thereof over three hours. The maximum charge for any given 24-hour period is $10.00. Assume that no car parks for longer than 24 hours at a time.

Write a program that will calculate and print the parking charges for each of three customers who parked their cars in this garage yesterday.

You should enter the hours parked for each customer. Your program should print the results in a tabular format, and should calculate and print the total of yesterday's receipts.

The program should use the function calculateCharges to determine the charge for each customer.

Your outputs should appear in the following format:

Car Hours Charge 1 1.5 2.00 2 4.0 2.50 3 24.0 10.00 TOTAL 29.5 14.50

Your program should be named parking.c.

Reference no: EM131008044

Questions Cloud

How would you feel about being diagnosed by a doctor : From the perspective of a patient, how would you feel about being diagnosed by a doctor who could be hundreds or thousands of miles away from you?
Find the approximate value of r for the sample : According to the researchers, ‘‘correlational analysis revealed a small but signi?cant inverse relationship between [actual] pain tolerance and the reported severity of chronic pain.'' Based on this statement, is the value of r for the 337 patient..
Construct a payoff table : Construct a payoff table for this set of actions using net profit as the "payoff." Don't forget the possible action of doing nothing.
Construct a payoff table for set of actions : Construct a payoff table for this set of actions using total cost as the "payoff." What is the probability that a randomly selected worker is a Female Hispanic/Latino?
Program that calculate and print the parking charges : Write a program that will calculate and print the parking charges for each of three customers who parked their cars in this garage yesterday.
Analyze the qi goals the organization has in place : Analyze publically available quality measures affecting health care organizations. Analyze the types of care or service your chosen organization focus on. Analyze the mission. Analyze the QI goals the organization has in place
Explain why the con?dence interval for the mean value of y : Explain why the con?dence interval for the mean value of y for a particular x-value, say, xp, gets wider the farther xp is from x¯. What are the implications of this phenomenon for estimation and prediction?
Explain how a market can be segmented : Explain and provide an example of credence - Explain how a market can be segmented. What are types of segments that a marketing manager could segment a market? Provide an example of segmenting a market for a pet product or service.
Explain the pros and cons of using simulation modeling : Under what conditions would you choose to use a simulation model? What is the simulation process? Explain the pros and cons of using simulation modeling

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Order of evaluation of arithmetic expressions

Why is the order of evaluation of arithmetic expressions important? Illustrate your answer with an example showing the effect parentheses can have on the way an expression is evaluated.

  Write menu driven program that make coffee shop operational

Write a menu-driven program that will make the coffee shop operational and Buy coffee in any size and in any number of cups.

  Create a dictionary and store student

Write a program to create a dictionary and store student id as key and student name as value and display the student id and name. After displaying the dictionary keys and values you should clear the dictionary so that your dictionary becomes empty..

  Generate a multiplication table

Write a C program (a pseudo code) that will generate a 5 X 5 multiplication table starting with the number of the users choice.

  Guessing game

In C++ develop a "guessing game" where the computer and the user alternatively guess the value of a randomly selected secret number between 1 and 99 (or any other maximum value). Initially, the computer selects the random number, and the user make..

  Prepare a program that prints the multiplication table

Prepare a program that prints the multiplication table for numbers 1 to 9. The program should include two nested loops and compute the products and print them

  Write program function prompt user for number of elements

Write a C++ program main function which will prompt the user for the number of elements called N desired for an array which has the capacity to store 50 elements.

  Give the implementation of the constructor

Implement the member function max() as an external function.

  An array-based queue for bcs registration

objective of this assignment is to use C++ to queue studentsinto an array-based queue for BCS registration. Students have the option of taking five different courses, but each course can only hold 8 students.

  Explain how to convert c program to mips program

Convert the following C program to MIPS program. Assuming that i, j, k, f, are stored in registers $s0, $s1, $s2, $s3 already.

  Statement that declares and stores the elements

Write a statement that declares and stores the elements of the following array into a vector object:

  Reverses the characters in a character array

Write the function reverseit that reverses the characters in a character array. You must also write main that calls reverseit.

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