IT 210
week two cost program in pseudocode

week two cost program in pseudocode - Process 1 2 3 4 5 6 7...

• Notes
• 3

This preview shows pages 1–3. Sign up to view the full content.

Process: 1. Get user input 2. Input item name 3. Input price of item (\$1000 for 1lb) 4. Divide price by ounces and pounds (1lb for \$1000 then 1oz. = \$62.5) 5. Prompt for number of ounces or pounds 6. Multiply the dividend unit price by number of oz. or multiply number of pounds by item price. 7. Display total unit price per oz. or lb. Input: Item name (coffee beans) Price (\$1000 per 1lb bag) Output: Total_cost (real: > 0) Main Module Declare item price as real Declare unit price per unit of weight as real Declare number of units as real Declare units (oz. or lb.) needed as real Declare output prompt as string Declare total cost as real Get user input Input item name Input price of item Divide price by ounces (1lb for \$1000 and 1 oz. for \$62.50)

This preview has intentionally blurred sections. Sign up to view the full version.

Multiply # of pounds by item price Prompt for ounces or pounds Multiply the dividend unit price by number of oz. Multiply the number of pounds by the item price. Display total unit price per oz. or lb. End main module Input Data Module Write, “What is the name of the item?” Item name Write, “What is the price of the item?”
This is the end of the preview. Sign up to access the rest of the document.
• Fall '10
• SCHAFFER
• item price, input Input item

{[ snackBarMessage ]}

What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern