A milk carton can hold 3.78 liters of milk. Each morning, a dairy farm ships cartons of
Question:
A milk carton can hold 3.78 liters of milk.
Each morning, a dairy farm ships cartons of milk to a local grocery store.
The cost of producing one liter of milk is $0.38, and the profit of each carton of milk is $0.27.
Write a program that does the following:
- Prompts the user to enter the total amount of milk produced in liters.
- Outputs the number of milk cartons needed to hold milk. (Round your answer to the nearest integer.)
- Outputs the cost of producing the milk.
- Outputs the profit from producing the milk.
Example
(Numbers with underscore indicate an input):
Enter, in liters, the total quantity of milk produced: 100
The number of milk cartons needed to hold milk: 26
The cost of producing milk: $ 38.00
Profit: $ 7.02
HINT: Pay attention to the printf format descriptors.
A milk carton can hold 3.78 liters of milk.
Each morning, a dairy farm ships cartons of milk to a local grocery store.
The cost of producing one liter of milk is $0.38, and the profit of each carton of milk is $0.27.
Write a program that does the following:
- Prompts the user to enter the total amount of milk produced in liters.
- Outputs the number of milk cartons needed to hold milk. (Round your answer to the nearest integer.)
- Outputs the cost of producing the milk.
- Outputs the profit from producing the milk.
Example
(Numbers with underscore indicate an input):
Enter, in liters, the total quantity of milk produced: 100
The number of milk cartons needed to hold milk: 26
The cost of producing milk: $ 38.00
Profit: $ 7.02
HINT: Pay attention to the printf format descriptors.
A milk carton can hold 3.78 liters of milk.
Each morning, a dairy farm ships cartons of milk to a local grocery store.
The cost of producing one liter of milk is $0.38, and the profit of each carton of milk is $0.27.
Write a program that does the following:
- Prompts the user to enter the total amount of milk produced in liters.
- Outputs the number of milk cartons needed to hold milk. (Round your answer to the nearest integer.)
- Outputs the cost of producing the milk.
- Outputs the profit from producing the milk.
Example
(Numbers with underscore indicate an input):
Enter, in liters, the total quantity of milk produced: 100
The number of milk cartons needed to hold milk: 26
The cost of producing milk: $ 38.00
Profit: $ 7.02
HINT: Pay attention to the printf format descriptors.
A milk carton can hold 3.78 liters of milk.
Each morning, a dairy farm ships cartons of milk to a local grocery store.
The cost of producing one liter of milk is $0.38, and the profit of each carton of milk is $0.27.
Write a program that does the following:
- Prompts the user to enter the total amount of milk produced in liters.
- Outputs the number of milk cartons needed to hold milk. (Round your answer to the nearest integer.)
- Outputs the cost of producing the milk.
- Outputs the profit from producing the milk.
Example (Numbers with underscore indicate an input):
Enter, in liters, the total quantity of milk produced: 100
The number of milk cartons needed to hold milk: 26
The cost of producing milk: $ 38.00
Profit: $ 7.02
HINT: Pay attention to the printf format descriptors.
Engineering Economy
ISBN: 978-0132554909
15th edition
Authors: William G. Sullivan, Elin M. Wicks, C. Patrick Koelling