RSS Forums RSS
Please support our Pascal and Delphi advertiser: Programming Forums

Pascal : Access a file of 100 Quiz questions so 12 Random ones are displayed?

Join Date: Dec 2006
Location: Romania
Posts: 171
Reputation: radu84 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 16
radu84 radu84 is offline Offline
Junior Poster

Re: Pascal : Access a file of 100 Quiz questions so 12 Random ones are displayed?

  #13  
Apr 23rd, 2007
ok, i'm sorry for my mistake, i only tried to explain it in a pseudocode manner.

so,

e.g: ado is that array of records.

randomize;
cycle//this can be a while, repeat,ect. you must think until when this cycle is going.
put_question: ado[random(i)+a_value]
end_of_cycle

hope that now is more obvious

best regards,
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 8:36 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC