pseudo code: help with semantics

Thread Solved

Join Date: Jan 2008
Posts: 2
Reputation: Terry McKenna is an unknown quantity at this point 
Solved Threads: 0
Terry McKenna Terry McKenna is offline Offline
Newbie Poster

pseudo code: help with semantics

 
0
  #1
Dec 19th, 2008
I am teaching myself pseudo code and I'd like ask for help to clear up my mind so I can understand the syntax and semantics a bit better. Would appreciate any help. (8 people must decide on one F*!)

I am trying understand var int F1=0; in the sample below
var = variable
int = ? (is this integer?)
0 = ?
To replace var int F1=0; with semantics what would be a good example?


var char randomFlavor = random("F1","F2","F3");
var int F1=0;
var int F2=0;
var int F3=0;

Count:
for each people in 8 people
var char pesonRandomFlavor = random("F1","F2","F3");
if( randomFlavor ==pesonRandomFlovor )
if (randomFlavor == "F1")
F1= F1+1;
else if (randomFlavor == "F2")
F2= F2+1;
else if (randomFlavor == "F3")
F3= F3+1;
endif
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 2,046
Reputation: Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice 
Solved Threads: 139
Team Colleague
Rashakil Fol's Avatar
Rashakil Fol Rashakil Fol is offline Offline
Super Senior Demiposter

Re: pseudo code: help with semantics

 
1
  #2
Dec 19th, 2008
This is a complete waste of your time.
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 2
Reputation: Terry McKenna is an unknown quantity at this point 
Solved Threads: 0
Terry McKenna Terry McKenna is offline Offline
Newbie Poster

Re: pseudo code: help with semantics

 
0
  #3
Dec 19th, 2008
Originally Posted by Rashakil Fol View Post
This is a complete waste of your time.
I never thought wanting learn a simple thing first is a waste of time.
Pseudo code seems a good place to start to understand algorithm basics.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Other Threads in the Legacy and Other Languages Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC