Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

10. Miles per Gallon A car holds 15 gallons of gasoline and can travel 375 miles before refueling. Write a program that calculates the number

image text in transcribed
10. Miles per Gallon A car holds 15 gallons of gasoline and can travel 375 miles before refueling. Write a program that calculates the number of miles per gallon the car gets. Display the result on the screen. Hint: Use the following formula to calculate miles per gallon (MPG): MPG = Miles Driven/Gallons of Gas Used 11. Distance per Tank of Gas A car with a 20-gallon gas tank averages 23.5 miles per gallon when driven in town, and 28.9 miles per gallon when driven on the highway. Write a program that calculates and displays the distance the car can travel on one tank of gas when driven in town and when driven on the highway. Hint: The following formula can be used to calculate the distance: Distance = Number of Gallons X Average Miles per Gallon 12. Land Calculation One acre of land is equivalent to 43,560 square feet. Write a program that calculates the number of acres in a tract of land with 391,876 square feet. 13. Circuit Board Price An electronics company sells circuit boards at a 35 percent profit. Write a program that will calculate the selling price of a circuit board that costs $14.95. Display the result on the screen. 14. Personal Information Write a program that displays the following pieces of information, each on a separate line: Your name Your address, with city, state, and ZIP code Your telephone number Your college major Use only a single cout statement to display all of this information. 15. Triangle Pattern Write a program that displays the following pattern on the screen: # # #

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

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions

Question

h) advertisement promotions

Answered: 1 week ago