Write a program to implement and test the algorithm that you designed for Exercise 15 of Chapter 1. (You may assume that the value of ∏= 5 3.141593. In your program, declare a named constant PI to...



Write a program to implement and test the algorithm that you designed for Exercise 15 of Chapter 1. (You may assume that the value of ∏= 5 3.141593. In your program, declare a named constant PI to store this value.)


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:


a. Prompts the user to enter the total amount of milk produced in the morning.


b. Outputs the number of milk cartons needed to hold milk. (Round your answer to the nearest integer.)


c. Outputs the cost of producing milk. d. Outputs the profit for producing milk.





May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here