Using Notepad++ (installed from the \"Start Here!\" page), write a program using
ID: 3683000 • Letter: U
Question
Using Notepad++ (installed from the "Start Here!" page), write a program using Pseudocode to solve the following 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 per pound and its weight in pounds and ounces. Then it should determine and display the unit price (the price per ounce) of that item and the total cost of the amount purchased.
You will need the following variables:
ItemName Pounds Ounces
PoundPrice TotalPrice UnitPrice
You will need the following formulas:
UnitPrice = PoundPrice/16
TotalPrice = PoundPrice * (Pounds + Ounces/16)
Explanation / Answer
Module Main()
Declare ItemName as String
Declare PoundPrice as Real
Declare Pounds as integer
Declare Ounces as integer
Declare UnitPrice as Real
Declare TotalPrice as Real
Display "Please enter the item Name"
Input ItemName
Display "Please enter the item price"
Input PoundPrice
Display "Please enter the item weight in ounces"
Input Ounces
Display "Please enter the item weight in pounds"
Input Pounds
UnitPrice=PoundPrice /16
TotalPrice =PoundPrice *(Pounds + Ounces/16)
Display "Total amount is " & TotalPrice
Display "unit price is " & UnitPrice & " per ounce"
End Module
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.