Answer:
milk_produced = float(input("Enter the total amount of milk produced in the morning: "))
liter_cost = float(input("Enter the cost of producing one liter of milk: "))
carton_profit = float(input("Enter the profit on each carton of milk: "))
carton_needed = round(milk_produced / 3.78)
cost = milk_produced * liter_cost
profit = carton_profit * carton_needed
print("The number of milk cartons needed to hold milk is " + str(carton_needed))
print("The cost of producing milk is " + str(cost))
print("The profit for producing milk is " + str(profit))
Explanation:
*The code is in Python.
Ask the user to enter milk_produced, liter_cost and carton_profit
Calculate the number of milk cartons needed, divide the milk_produced by the capacity (3.78) of a cartoon and round the result
Calculate the cost, multiply the milk_produced by liter_cost
Calculate the profit, multiply the carton_profit by carton_needed
Print the results