Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   Dev Hardware ForumsSOFTWAREProgramming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Hardware Forums Sponsor:
  Trader Rating: 0 · #1  
Old February 8th, 2008, 08:47 PM
Techy0406 Techy0406 is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Feb 2008
Posts: 7 Techy0406 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 48 m 12 sec
Reputation Power: 0
Anyone know anything about pseudocode

just starting and having a problem figuring this out how would i write a program to have the price per unit in pseudocode i am just clueless on this.

Reply With Quote
  Trader Rating: 0 · #2  
Old February 8th, 2008, 08:55 PM
Sand Man's Avatar
Sand Man Sand Man is online now
¯\(º_o)/¯
Click here for more information.
 
Join Date: Jun 2005
Location: in a daydream
Posts: 3,500 Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)  Folding Points: 167392 Folding Title: Super Ultimate Folder - Level 1Folding Points: 167392 Folding Title: Super Ultimate Folder - Level 1Folding Points: 167392 Folding Title: Super Ultimate Folder - Level 1Folding Points: 167392 Folding Title: Super Ultimate Folder - Level 1Folding Points: 167392 Folding Title: Super Ultimate Folder - Level 1Folding Points: 167392 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 4 Weeks 1 Day 11 h 15 m 9 sec
Reputation Power: 5143
Send a message via MSN to Sand Man Send a message via Google Talk to Sand Man
pseudocode is very easy. you basically just write in words how a program should work:

if apple costs < $1 then
buy 50
else
buy 100
end

very similar to that. besides, you gave very little information to you actual problem.
__________________
How much net work could a network work, if a network could net work?


Reply With Quote
  Trader Rating: 0 · #3  
Old February 8th, 2008, 09:01 PM
Techy0406 Techy0406 is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Feb 2008
Posts: 7 Techy0406 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 48 m 12 sec
Reputation Power: 0
here is the problem

here is the first of 10 problems i am trying to figure out..

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.

Reply With Quote
  Trader Rating: 0 · #4  
Old February 8th, 2008, 09:10 PM
Sand Man's Avatar
Sand Man Sand Man is online now
¯\(º_o)/¯
Click here for more information.
 
Join Date: Jun 2005
Location: in a daydream
Posts: 3,500 Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)  Folding Points: 167392 Folding Title: Super Ultimate Folder - Level 1Folding Points: 167392 Folding Title: Super Ultimate Folder - Level 1Folding Points: 167392 Folding Title: Super Ultimate Folder - Level 1Folding Points: 167392 Folding Title: Super Ultimate Folder - Level 1Folding Points: 167392 Folding Title: Super Ultimate Folder - Level 1Folding Points: 167392 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 4 Weeks 1 Day 11 h 15 m 9 sec
Reputation Power: 5143
Send a message via MSN to Sand Man Send a message via Google Talk to Sand Man
you pretty much have the answer in the problem.

enter item name
enter item weight
enter item price

cost = weight x price

output cost

that should get you started.

Reply With Quote
  Trader Rating: 0 · #5  
Old February 8th, 2008, 09:16 PM
Techy0406 Techy0406 is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Feb 2008
Posts: 7 Techy0406 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 48 m 12 sec
Reputation Power: 0
hmmm

so if i understand correctly.....



Prompt for item name , item price , item weight
input item name, item, item price , item weight

set unit price = price / weight


display "price per unit"

Reply With Quote
  Trader Rating: 0 · #6  
Old February 8th, 2008, 09:17 PM
Techy0406 Techy0406 is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Feb 2008
Posts: 7 Techy0406 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 48 m 12 sec
Reputation Power: 0
// calculate price per unit

prompt for item name , item price , item weight by " lbs,oz"
input item name , item price , item weight " lbs,oz"

divide weight in lbs x 16oz = total units
divide price x total units = price per unit

display item name , price per unit


thats whats i got so far i am looking at a few examples .... just wondering no were the term declare comes into this or if i am missing something .

Reply With Quote
  Trader Rating: 0 · #7  
Old February 8th, 2008, 11:34 PM
JohnFrank's Avatar
JohnFrank JohnFrank is offline
Contributing User
Click here for more information. Click here for more information
Click here for more information
 
Join Date: Jan 2008
Location: Lilyfield NSW Australia
Posts: 867 JohnFrank User rank is General 44th Grade (Above 100000 Reputation Level)JohnFrank User rank is General 44th Grade (Above 100000 Reputation Level)JohnFrank User rank is General 44th Grade (Above 100000 Reputation Level)JohnFrank User rank is General 44th Grade (Above 100000 Reputation Level)JohnFrank User rank is General 44th Grade (Above 100000 Reputation Level)JohnFrank User rank is General 44th Grade (Above 100000 Reputation Level)JohnFrank User rank is General 44th Grade (Above 100000 Reputation Level)JohnFrank User rank is General 44th Grade (Above 100000 Reputation Level)JohnFrank User rank is General 44th Grade (Above 100000 Reputation Level)JohnFrank User rank is General 44th Grade (Above 100000 Reputation Level)JohnFrank User rank is General 44th Grade (Above 100000 Reputation Level)JohnFrank User rank is General 44th Grade (Above 100000 Reputation Level)JohnFrank User rank is General 44th Grade (Above 100000 Reputation Level)JohnFrank User rank is General 44th Grade (Above 100000 Reputation Level)JohnFrank User rank is General 44th Grade (Above 100000 Reputation Level)JohnFrank User rank is General 44th Grade (Above 100000 Reputation Level)  Folding Points: 4944662 Folding Title: Super Ultimate Folder - Level 10Folding Points: 4944662 Folding Title: Super Ultimate Folder - Level 10Folding Points: 4944662 Folding Title: Super Ultimate Folder - Level 10Folding Points: 4944662 Folding Title: Super Ultimate Folder - Level 10Folding Points: 4944662 Folding Title: Super Ultimate Folder - Level 10Folding Points: 4944662 Folding Title: Super Ultimate Folder - Level 10Folding Points: 4944662 Folding Title: Super Ultimate Folder - Level 10Folding Points: 4944662 Folding Title: Super Ultimate Folder - Level 10Folding Points: 4944662 Folding Title: Super Ultimate Folder - Level 10Folding Points: 4944662 Folding Title: Super Ultimate Folder - Level 10
Time spent in forums: 1 Week 4 Days 16 h 30 m 55 sec
Reputation Power: 3891
Send a message via MSN to JohnFrank
Quote:
Originally Posted by Techy0406
// calculate price per unit

prompt for item name , item price , item weight by " lbs,oz"
input item name , item price , item weight " lbs,oz"

divide weight in lbs x 16oz = total units
divide price x total units = price per unit

display item name , price per unit


thats whats i got so far i am looking at a few examples .... just wondering no were the term declare comes into this or if i am missing something .
Output needs to be price per ounce according to your question. Questions talks about item not items so you may not need to think about qty in calc.

Prize per ounce = item price divided by ((item weight lbs X 16) + Item weight ozs)

Display item name, price per ounce

If you are following some reference for the pseudo code then it should be in that style, but strictly speaking anything that defines the steps and calculations correctly would be correct pseudo code.
Comments on this post
madhyena agrees: Yes. Pseudo-code is flexible and very subjective.
__________________

Reply With Quote
  Trader Rating: 0 · #8  
Old February 9th, 2008, 02:57 AM
drumz0rz's Avatar
drumz0rz drumz0rz is offline
Has really smelly feet
Click here for more information.
 
Join Date: Jun 2004
Location: NY
Posts: 5,147 drumz0rz User rank is General 50th Grade (Above 100000 Reputation Level)drumz0rz User rank is General 50th Grade (Above 100000 Reputation Level)drumz0rz User rank is General 50th Grade (Above 100000 Reputation Level)drumz0rz User rank is General 50th Grade (Above 100000 Reputation Level)drumz0rz User rank is General 50th Grade (Above 100000 Reputation Level)drumz0rz User rank is General 50th Grade (Above 100000 Reputation Level)drumz0rz User rank is General 50th Grade (Above 100000 Reputation Level)drumz0rz User rank is General 50th Grade (Above 100000 Reputation Level)drumz0rz User rank is General 50th Grade (Above 100000 Reputation Level)drumz0rz User rank is General 50th Grade (Above 100000 Reputation Level)drumz0rz User rank is General 50th Grade (Above 100000 Reputation Level)drumz0rz User rank is General 50th Grade (Above 100000 Reputation Level)drumz0rz User rank is General 50th Grade (Above 100000 Reputation Level)drumz0rz User rank is General 50th Grade (Above 100000 Reputation Level)drumz0rz User rank is General 50th Grade (Above 100000 Reputation Level)drumz0rz User rank is General 50th Grade (Above 100000 Reputation Level)  Folding Points: 422449 Folding Title: Super Ultimate Folder - Level 1Folding Points: 422449 Folding Title: Super Ultimate Folder - Level 1Folding Points: 422449 Folding Title: Super Ultimate Folder - Level 1Folding Points: 422449 Folding Title: Super Ultimate Folder - Level 1Folding Points: 422449 Folding Title: Super Ultimate Folder - Level 1Folding Points: 422449 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Weeks 5 Days 19 h 36 m 12 sec
Reputation Power: 4319
Send a message via AIM to drumz0rz Send a message via Google Talk to drumz0rz
sounds to me like a homework problem...
__________________



Reply With Quote
  Trader Rating: 0 · #9  
Old February 9th, 2008, 08:28 AM
Techy0406 Techy0406 is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Feb 2008
Posts: 7 Techy0406 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 48 m 12 sec
Reputation Power: 0
so from what i gather this is just s simple set of instructions to guide you through the development of the program.. is that about right...? But if its so flexible and there is no real set of commans to follow then wouldn't writing be more a waste of time wouldn't it be easier just to make a quick diagram or flow chart?

Reply With Quote
  Trader Rating: 0 · #10  
Old February 9th, 2008, 08:31 AM
Sand Man's Avatar
Sand Man Sand Man is online now
¯\(º_o)/¯
Click here for more information.
 
Join Date: Jun 2005
Location: in a daydream
Posts: 3,500 Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)Sand Man User rank is General 63rd Grade (Above 100000 Reputation Level)  Folding Points: 167392 Folding Title: Super Ultimate Folder - Level 1Folding Points: 167392 Folding Title: Super Ultimate Folder - Level 1Folding Points: 167392 Folding Title: Super Ultimate Folder - Level 1Folding Points: 167392 Folding Title: Super Ultimate Folder - Level 1Folding Points: 167392 Folding Title: Super Ultimate Folder - Level 1Folding Points: 167392 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 4 Weeks 1 Day 11 h 15 m 9 sec
Reputation Power: 5143
Send a message via MSN to Sand Man Send a message via Google Talk to Sand Man
Quote:
Originally Posted by drumz0rz
sounds to me like a homework problem...
he mentions it in the 3rd post. at least he didn't come out and blatantly ask for the answer.
Comments on this post
Techy0406 agrees: thx for the guidence

Reply With Quote
  Trader Rating: 0 · #11  
Old February 9th, 2008, 08:32 AM
Techy0406 Techy0406 is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Feb 2008
Posts: 7 Techy0406 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 48 m 12 sec
Reputation Power: 0
ya it is one of 10 don't want the answer just wanted to know what the text didn't explain..

Reply With Quote
  Trader Rating: 0 · #12  
Old February 9th, 2008, 08:40 AM
JohnFrank's Avatar
JohnFrank JohnFrank is offline
Contributing User
Click here for more information. Click here for more information
Click here for more information
 
Join Date: Jan 2008
Location: Lilyfield NSW Australia
Posts: 867 JohnFrank User rank is General 44th Grade (Above 100000 Reputation Level)JohnFrank User rank is General 44th Grade (Above 100000 Reputation Level)JohnFrank User rank is General 44th Grade (Above 100000 Reputation Level)JohnFrank User rank is General 44th Grade (Above 100000 Reputation Level)JohnFrank User rank is General 44th Grade (Above 100000 Reputation Level)JohnFrank User rank is General 44th Grade (Above 100000 Reputation Level)JohnFrank User rank is General 44th Grade (Above 100000 Reputation Level)JohnFrank User rank is General 44th Grade (Above 100000 Reputation Level)JohnFrank User rank is General 44th Grade (Above 100000 Reputation Level)JohnFrank User rank is General 44th Grade (Above 100000 Reputation Level)JohnFrank User rank is General 44th Grade (Above 100000 Reputation Level)JohnFrank User rank is General 44th Grade (Above 100000 Reputation Level)JohnFrank User rank is General 44th Grade (Above 100000 Reputation Level)JohnFrank User rank is General 44th Grade (Above 100000 Reputation Level)JohnFrank User rank is General 44th Grade (Above 100000 Reputation Level)JohnFrank User rank is General 44th Grade (Above 100000 Reputation Level)  Folding Points: 4944662 Folding Title: Super Ultimate Folder - Level 10Folding Points: 4944662 Folding Title: Super Ultimate Folder - Level 10Folding Points: 4944662 Folding Title: Super Ultimate Folder - Level 10Folding Points: 4944662 Folding Title: Super Ultimate Folder - Level 10Folding Points: 4944662 Folding Title: Super Ultimate Folder - Level 10Folding Points: 4944662 Folding Title: Super Ultimate Folder - Level 10Folding Points: 4944662 Folding Title: Super Ultimate Folder - Level 10Folding Points: 4944662 Folding Title: Super Ultimate Folder - Level 10Folding Points: 4944662 Folding Title: Super Ultimate Folder - Level 10Folding Points: 4944662 Folding Title: Super Ultimate Folder - Level 10
Time spent in forums: 1 Week 4 Days 16 h 30 m 55 sec
Reputation Power: 3891
Send a message via MSN to JohnFrank