-
February 25th, 2009, 09:02 PM #1Junior Member
- Join Date
- Feb 2009
- Posts
- 1
Pseudocode? I have a problem doing this problem.?
You are the owner of a vegetarian pizzeria and you want to write a program to allow the customer to order only ONE pizza online. You will prompt the customer for his/her name, pizza size being order (small, medium, or large), and pizza type being ordered (veggie or cheese), and then input this data. You are to output the customer name, pizza size, pizza type, and cost of pizza back to the customer. For a veggie pizza, small costs $10, medium costs $12.25, and large costs $14.50. For a cheese pizza, small costs $7, medium costs $8, and large costs $9. Be sure to validate the size and type of pizza, and if the data is invalid, output an appropriate message to the customer.
I don't understand how to write this as a pseudocode. This is not my homework. This is an extra problem I'm trying to do on my own to understand how to do other kind of pesudocode's problems.
-
February 25th, 2009, 09:17 PM #2Not Really a Member
- Join Date
- Oct 2001
- Posts
- 27,856
pseudocode isn't really code, so its really just laying out the problem
Prompt customer for name, size of pizza, type of pizza
If pizza = veggie then
if pizza = large then price = blah
if pizza = med then price = blah
etc etc
-
February 26th, 2009, 10:40 PM #3
Never got much into psuedocode much during my college days even though they tried to teach it. Why? Never liked the idea of "half" writing it it English when I could be writing acutal code...waste of time when you're busy enough already in college.
Now, flowcharts were my thing
But that's just me because I'm a visual-type of person and it really helped we work out program flow before putting fingers to keyboard. Sometimes I would flowchart entire programs in general or specific portions of a program in detail as needed. Worked for me...
-
March 22nd, 2009, 03:01 PM #4Member
- Join Date
- Mar 2005
- Posts
- 93
Set Size1=small
Set Size2= medium
Set Size3 = Large
Set type1 = Veggie
Set type2= Cheese
Set prices1t1=
set prices2t1=
Set prices3t1=
(and so on)
Receives Name from User
Prints Size1, Size2, Size3
Receives Size from User
Prints Type1, Type2
Receives Type from User
Print Name, Size#, Type#, Sum
This is very very generic, but pseudo code and all.
-
March 23rd, 2009, 01:17 PM #5Junior Member
- Join Date
- Mar 2009
- Posts
- 7
If you are the only programmer, my suggestion is not to try to force your problem into pseudo code, but instead just to write it down in your way.
Pseudo code can be nice though if you are several programmers in the same project. But even then, words and flow charts have worked better for me.
-
March 23rd, 2009, 08:22 PM #6
Ok, I'm going to do this as a one-time favor and since it's kind of old.
Ask customer for name
Ask customer for pizza size (S)mall, (M)eduim or (Large)
If pizza size not equal S or M or L
tell customer to order Small Medium or Large
Ask customer for pizza type (V)eggie or (C)heese
If pizza type not equal V or C
tell customer to select Veggie or Cheese
If pizza type = Cheese
If pizza size = large
pizza cost = 9.00
tell customer cost
If pizza size = medium
blah, blah, blah
"Thank you for your order" name
"You ordered one " pizza size pizza type
"Your bill is " pizza cost
-
April 23rd, 2009, 01:00 AM #7Junior Member
- Join Date
- Apr 2009
- Posts
- 3
Pseudocode for project
i need a pseudocode for a list of employees and salaries and determine the mean (average) salary as well as the number of salaries above and below the mean
-
April 25th, 2009, 07:50 PM #8
have you even given in a shot? As this seems like the type of thing that must be a homework assignment I wouldn't expect to get complete answers. Look at root's post right above yours for a good example of pseudocode.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Computer Problem out of the blue...(long post explaing problem)
By Aegaeonos in forum General Tech DiscussionReplies: 3Last Post: December 21st, 2006, 05:37 PM -
IE Save picture problem/Real player problem
By smkeller9 in forum Technical SupportReplies: 3Last Post: February 22nd, 2004, 03:42 PM -
Pseudocode Algorithm
By Toasted Onions in forum Webmastering and ProgrammingReplies: 1Last Post: September 18th, 2003, 03:47 AM -
Memory problem after format & partion problem
By soulja in forum Technical SupportReplies: 3Last Post: June 2nd, 2003, 09:59 PM -
Irritating Problem With Windows Media Player 9 Series, and TV-OUT Problem. HELP!
By ¥ KOMI ¥ in forum Graphics Cards and DisplaysReplies: 2Last Post: November 15th, 2002, 05:03 PM



LinkBack URL
About LinkBacks



Reply With Quote

A bushel of Pinocchios for IRS’s Lois Lerner - The Washington Post And the IRS wonders why no one trusts them.
A bushel of Pinocchios for IRS’s...