Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Write a program that calculates a cars gas mileage. The program should ask the user to enter the number of gallons of gas the

1. Write a program that calculates a cars gas mileage. The program should ask the user to enter the number of gallons of gas the car can hold and the number of miles it can be driven on a full tank. It should then calculate and display the number of miles per gallon the car gets. 2. Write a program that asks the user to enter their monthly costs for each of the following housing-related expenses: rent or mortgage payment utilities phones cable The program should then display the total monthly cost of these expenses and the total annual cost of these expenses. 3. A bag of cookies holds 30 cookies. The calorie information on the bag claims that there are 10 servings in the bag and that a serving equals 240 calories. Write a program that asks the user to input how many cookies they actually ate and then reports how many total calories were consumed. Note: you need to submit the source code and the output of the program

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

Learning PostgreSQL

Authors: Salahaldin Juba, Achim Vannahme, Andrey Volkov

1st Edition

178398919X, 9781783989195

More Books

Students also viewed these Databases questions

Question

What are Decision Trees?

Answered: 1 week ago

Question

What is meant by the Term Glass Ceiling?

Answered: 1 week ago