Вы находитесь на странице: 1из 2

Analysis: This program will be solving a problem, and the solution will be to record the name, price, and

weight of a product for the Super Supermarket store, and determine the unit price (per ounce) of the item. Process: 1. Get user input 2. Find unit price 3. Display unit price Input: name price weight (string) (real: 0-100) (real: 0-100)

Output: name unit price Design Main Module Declare name as string Declare price as real Declare weight as real Declare unit price as real Call Input Data Module Call Calculation Module Call Output Results Module End program End Main Module Input Data Module Write, What is the name of the product? Input name Write, What is the price of the product? Input price Write, What is the weight in pounds of the product? (string) (real: > 0)

Input weight End Input Data Module Calculation Module Declare unit price as real Set unit price = price / weight End Calculation Module
Output Results Module Write, The unit price for, name Unit price End Output Results Module

Вам также может понравиться