practice for week 2 assignment

practice for week 2 assignment - The manager of the Super...

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

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. It should then determine and display the unit price (the price per ounce) of the item. Analysis Process : 1. Get user input unit price 2. Find room area (find unit price) input item name 3. Divide room area (input item name) find weight in pounds and ounces 4. Multiply gallons (input item price) 5. Prompt for ounces (determine price per ounce) prompt for ounces 6. Display total (display unit price per ounce) 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 lb. 7. Display total unit price per oz. or lb.
Image of page 1

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

Input: Input: Item name (coffee beans) Price ($1000 per 100lb bag) Output: total_cost (real: > 0) Output: Total_cost (real: > 0) Design Main Module
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.
  • Fall '10
  • Imperial units, United States customary units, Fluid ounce

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    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.

    Student Picture

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

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern