Write a function called parkingcharge

Assignment Help Other Subject
Reference no: EM13259856

Write a function called parkingCharge that, given the type of vehicle (c for car, b for bus, t for truck) and the hours a vehicle spent in the parking lot, returns the parking charge based on the rates shown below.

car        $2 per hour

bus        $3 per hour

truck      $4 per hour

Also for this problem display the message "The code for the type of vehicle is incorrect" if the code that is being entered from the keyboard is not equal to 'c' or 'b' or 't'.

**NOTE: write the complete program (including the appropriate functions). 

please make sure your answer is right and run in visualstudio program.

Reference no: EM13259856

Questions Cloud

Generation-bresenham algorithms and circle : By using basic line generation –Bresenham algorithms and Circle (Mid Point Circle Algorithm), draw an interactive picture of your home town creatively. You may use all Processing 2 drawing primitives’ features EXCEPT Line and Circle.
References to death present in the novel : Can you describe the passages of the novel where the differences between the South and the North are more evident? Can you remember the different images / references to death present in the novel? What do they mean?
Determining the thermal conductivity of a solid material : A procedure for determining the thermal conductivity of a solid material involves embedding a thermocouple in a thick slab of the solid and measuring the response to a prescribed change in temperature at one surface
Implement a matrix-vector multiplication routine : Implement a matrix/vector multiplication routine in a function using for?loops. Make the routine’s matrices sizes generic so it will work with a matrix of any size. Create a 5?element column vector x full of random real-values and a  matrix A full of..
Write a function called parkingcharge : Write a function called parkingCharge that, given the type of vehicle (c for car, b for bus, t for truck) and the hours a vehicle spent in the parking lot, returns the parking charge based on the rates shown below.
Created in 1974 to administer new campaign reform laws : In 1839, which state voted to allow women to own property in their own name? Elections for members of Congress occur. What organization was created in 1974 to administer new campaign reform laws?
Dividend and divisor are integers and quotient is a double : If the variable divisor is not zero, divide the variable dividend by divisor, and store the result in quotient. if divisor is zero, assign it to quotient. Then print all three variables. Assume that dividend and divisor are integers and quotient is a..
What challenge do minor parties often face : Minor parties are the most successful. What challenge do minor parties often face? How do political scientists define political socialization?
What is a trade association-raise money from individuals : Which of the following raise money from individuals and then distribute it in the form of contributions to political candidates? What is a public interest group? A) a group that conducts research and analysis on public policy issues. What is a trade ..

Reviews

Write a Review

Other Subject Questions & Answers

  Information systems-payroll, accounting or customer service

Information systems, payroll, accounting, or customer service, this is called

  Why careful processing can manipulate the microstructure

why careful processing can manipulate the microstructure , which allows the material properties to be tailored to a specific application?

  Validity and data-method types in research

Define and explain the kinds of reliability. Provide examples of these types of reliability as they apply to human services research or to human services management research.

  Food and drug administration function

What is the essence of the process by which pharmaceutical company and the Food and Drug Administration (FDA) function in the development of a new medication?

  Non-discriminatory work environment

How do policies help to assure a non-discriminatory work environment?

  Relative vertical position in the water column

Oceanographers name currents and large bodies of water according to their relative vertical position in the water column. which one of the following is the water mass that resides below 1,500 meters (5000 feet) to a depth of about 4,000 meters (13,00..

  Reflection survey indicates a depth

Suppose that a reflection survey indicates a depth of 750 m to the first rflector. the horizontal reflecting interface is the boundry between layers defined by the velocities v1=1500 m/s and v2 2500 m/s. derive a travel time vs. distance equation for..

  Differences between quran and holy texts of any religion

On the basis of your readings this semester to date, what would you identify as the most significant similarities and/or differences between the Qur'an and the holy texts of any other religion of your choice? Please explain why and support your respo..

  How have people changed skills between 1988 to 2011

How have people changed skills between 1988 to 2011 - how will you as a student keep track of new software, hardware, and technology that can make work easier?

  Caring code in clinical nursing education

I'm analyzing a research article titled ' application and evaluation of a caring code in clinical nursing education' where the purpose of the study is to determine if a 'caring code'

  Luther was eventually excommunicated from catholic church

Luther was eventually excommunicated from the Catholic Church for his outcry against the church’s practices. Explain whether you think Luther was justified in his accusations, and state the reasons for your position.

  No evil can happen to a good man

In the Apology Plato claims that "no evil can happen to a good man”, but in the Crito he suggests that “life is not worth living with a corrupted body”.

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