Random questions in a quiz...

Results 1 to 2 of 2

Thread: Random questions in a quiz...

  1. #1
    Join Date
    Dec 1969

    Default Random questions in a quiz...

    I&#039m trying to set up a quiz asp for an educational site and i want the questions to come out in different orders each time someone views it. Is this possible? Right now i&#039m using the quiz script from asp101 with a database.

  2. #2
    Sathiya Guest

    Default RE: Random questions in a quiz...

    May be this psuedocode may help you. If you store the questions in array.<BR>Let you have n questions<BR>1. form an array of n random number starting from 1 to n where no number repeats using randomize<BR>2. do a for loop to get one number at a time from that array<BR>3. Comapre the random number and the question number if equal copy the row to a new array with Qno, Question and the random number<BR>4. do the step 3 for n number of times.<BR>5. use the new array to display the question.<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts