1,479
22
Essay, 2 pages (250 words)

Checkpoint chapter 2 programming problem

The manager of the Super Supermarket would like to be able to compute the unit price for products sold there. To do this, the program should input the name and price of an item and its weight in pounds and ounces. Analysis Process: 1. Display program title. 2. Prompt for item name. 3. Prompt for price of item. 4. Prompt for weight of item in pounds. 5. Prompt for weight of item in ounces. 6. Convert pounds to ounces then add it to input ounces. 7. Dived price total by ounces. 8. Display price per ounce. Input: Item name (String: ItemName) Item Price (Real: Price) Item Weight in pounds (integer: Pounds) Item Weight in ounces (integer: Ounces) Output: Unit Price (real: UnitPrice) Design Main Module Declare ItemName as string Declare ItemPrice as real Declare ItemWeightLb as integer Declare ItemWeight Oz as integer Declare UnitPrice as real Write “ Welcome User” Write “ This program computes an unit items price (In Ounces)” Call Input Data Module Call Perform Calculations Module Call Output Results Module End Program End Main Module Input Data Module Write “ What is Items name? ” Input ItemName Write “ What is price of Item? ” Input ItemPrice Write “ What is Item weight in pounds? ” Input ItemWeightLB Write “ What does item weigh converted into ounces? ” Input ItemWeightOz End Input Data Module Perform Calculations Module Declare TotalOz as real Set ounces = 16 + pounds + ounces UnitPrice = PoundPrice/16 TotalPrice = PoundPrice*(Pounds + Ounces/16) End Perform Calculations Module Output Results Module Write “ Item is” : ItemName Write “ Total Price of item is” : ItemPrice Write “ Unit price of item is” : UnitPrice/Oz End Output Results Module End Program

Thank's for Your Vote!
Checkpoint chapter 2 programming problem. Page 1
Checkpoint chapter 2 programming problem. Page 2

This work, titled "Checkpoint chapter 2 programming problem" was written and willingly shared by a fellow student. This sample can be utilized as a research and reference resource to aid in the writing of your own work. Any use of the work that does not include an appropriate citation is banned.

If you are the owner of this work and don’t want it to be published on AssignBuster, request its removal.

Request Removal
Cite this Essay

References

AssignBuster. (2021) 'Checkpoint chapter 2 programming problem'. 14 November.

Reference

AssignBuster. (2021, November 14). Checkpoint chapter 2 programming problem. Retrieved from https://assignbuster.com/checkpoint-chapter-2-programming-problem/

References

AssignBuster. 2021. "Checkpoint chapter 2 programming problem." November 14, 2021. https://assignbuster.com/checkpoint-chapter-2-programming-problem/.

1. AssignBuster. "Checkpoint chapter 2 programming problem." November 14, 2021. https://assignbuster.com/checkpoint-chapter-2-programming-problem/.


Bibliography


AssignBuster. "Checkpoint chapter 2 programming problem." November 14, 2021. https://assignbuster.com/checkpoint-chapter-2-programming-problem/.

Work Cited

"Checkpoint chapter 2 programming problem." AssignBuster, 14 Nov. 2021, assignbuster.com/checkpoint-chapter-2-programming-problem/.

Get in Touch

Please, let us know if you have any ideas on improving Checkpoint chapter 2 programming problem, or our service. We will be happy to hear what you think: [email protected]