Calculates the total cost of gasoline

Assignment Help Other Subject
Reference no: EM13276661

Write a program that calculates the total cost of gasoline. The going rate of gas is $3.40 per gallon. Prompt the user to enter the (1) number of gallons they wish to purchase, and (2) the number of gallons required to fill the tank. You must make sure that the number of gallons requested does not exceed the number of gallons required to fill up the tank, and is greater than zero (use an if statement). The program should output this statement: “It will cost x dollars to fill up n gallons of gasoline at $3.40 per gallon.”

Reference no: EM13276661

Questions Cloud

Management of air quality in smog valley. : Management of Air Quality in Smog Valley. Revisit the example problem from class. Assume that a new ambient air quality standard has been introduced for this pollutant so that the maximum ambient concentration at the cities should not exceed 85 µg/m3..
Determine the rate heat is rejected : A refrigerator, with coils at 28 C operates with a coefficient performance of 4.0 and a power input of 0.8 kW. Heat is rejected from the surrounding air at 20 C. Determine a)the rate heat is rejected(kW), b)the lowest theoretical temp inside the refr..
Identify the major blood vessels associated : Identify the major blood vessels associated with each kidney and trace the path of blood flow through a kidney?
Requests the numeric grades on a midterm and a final exam : rite a program that requests the numeric grades on a midterm and a final exam and then uses a Function procedure to assign a semester grade (A, B, C, D, OR F). The final exam should count twice as much as the midterm exam, the semester average should..
Calculates the total cost of gasoline : Write a program that calculates the total cost of gasoline. The going rate of gas is $3.40 per gallon. Prompt the user to enter the (1) number of gallons they wish to purchase, and (2) the number of gallons required to fill the tank.
Types of oceanic energy source available for harvesting : "What are two most promising types of oceanic energy source available for harvesting?"
What to do about the environment globally : Before we decide what to do about the environment globally, let’s see what we can do locally. What environmental problems are you aware of in the area where you live? What solutions, from among those proposed by the authors of the essays, do you thin..
What is technolgies of hubris and technologies of humility : What is technolgies of Hubris? What is Technologies of Humility?
Grip on the psyche and physical health of girls and women : Whether it is dark, sad eyes of a woman in purdah or the anxious darkly circled eyes of a girl with anorexia nervosa, the woman trapped inside needs to be liberated from cultural confines in whatever form they take.

Reviews

Write a Review

Other Subject Questions & Answers

  Mechanical advantages and disadvantages in lever systems

Write down the difference between mechanical advantages and disadvantages in lever systems and find out which kind of lever doctor was using to test quadriceps muscle.

  Ethical and legal questions-children and adolescents

Review the particular training required in order to work with children and/or adolescents, and the sorts of ethical and legal questions that arise in working with children and adolescents?

  About your own skills-career and experience

Think strategically about your own skills, career, and experience: Would you succeed as a manager if you started a company right out of college, without having gained any experience as an employee in another company? Why or why not

  Electric power costs

Electric power costs $0.0691/ kilowatt-hour. At this rate, what is the cost to operate a machine for 2000 hours at 75 psig discharge pressure? What would be the cost if specific motor parts of the machine were to be 100% efficient,

  Describe the impacts of global climate change on migratory

Describe the impacts of global climate change on migratory wild species and suggest priority solutions. Give an overview of global change from the African perspective, emphasizing on the key challenges. Discuss the main components of a Global En..

  Creators of the articles of confederation

The creators of the Articles of Confederation

  Write a console-based program that prompts a user

Write a console-based program that prompts a user for an hourly pay rate. If the user enters values less than $7.50 or greater than $49.99, prompt the user again.

  Supreme court''s decision in brown v. board of education

Based on the reading in Ch. 3 of the text, what factors do you think most contributed to the Supreme Court's decision in Brown v. Board of Education (1954)? How does this decision continue to impact education today?

  Develop in dynamic and diverse ways

List the elements in Silla’s historical environment that enabled Silla Buddhism to develop in dynamic and diverse ways.

  Removal or reduction of an aversive stimulus

What strengthens the likelihood of a behavior happening again through the removal or reduction of an aversive stimulus?

  Explain western culture in their sculpture of the human form

The Hellenic Greeks presented a classical model of beauty for Western culture in their sculpture of the human form. What makesit beautiful and do we still accept those standards of beauty today? Explain.

  Processes of primary and secondary active transport

Describe the processes of primary and secondary active transport, including the factors that can affect active transport

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