Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

beginner help

Name: Anonymous 2012-11-16 20:12

Use pseudocode to design a suitable program to solve it.

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. 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 (a String) Pounds (a Float) Ounces (a Float)
PoundPrice (a Float) TotalPrice (a Float) UnitPrice (a Float)
You will need the following formulas:
UnitPrice = PoundPrice/16
TotalPrice = PoundPrice*(Pounds + Ounces/16)

Does this look right?

Input Data module
    Write “What is the item’s name?”
    Input ItemName
    Write “What is the item’s weight in pounds?”
    Input Pounds
    Write “What is the cost per pound?”
    Input PoundPrice   
Perform Calculations module
Set UnitPrice = PoundPrice/16
    Set TotalPrice = PoundPrice*(Pounds + Ounces/16)
Output Results module
Write “The item is:” + ItemNate
Write “The price per ounce is:” + UnitPrice
Write “The total price of the item is:” + TotalPrice

Name: Anonymous 2012-11-16 20:22

We only let EXPERT PROGRAMMERS post here.

Name: Anonymous 2012-11-16 20:24

but you could give me a simple yes or no and I'd be on my way

Name: Anonymous 2012-11-16 20:27

>>2
yes

on your way, hymie

Name: Anonymous 2012-11-16 20:30

We'll do both parties a favor.

Please get a Stack Overflow question and make your questions there. Make sure you read the rules for posting and post in the right Stack Exchange site (maybe Code Review is right for this question).

Name: Anonymous 2012-11-16 21:22

They tell you what variables you will need?
Are they going to type the fucking program for you when you need to turn your pseudo-code into a program?

>>5
I don't think this is Stack Overflow worthy, though I see what you're trying to do.

Don't change these.
Name: Email:
Entire Thread Thread List