Quiz program, array help

Page 1 of 1

1 Replies - 1008 Views - Last Post: 06 November 2012 - 09:41 AM Rate Topic: -----

#1 ryan449   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 22-October 12

Quiz program, array help

Posted 06 November 2012 - 07:59 AM

I am trying to make a quiz with visual basic, i have to load the quiz from a text file in this format:
question, answerA, answerB, answerC, answerD, Actual answer
Question2,answer a, answer b, answer c, answer d, Actual answer
Question3..... and so on

i need a way that when i press next, the next question will show up. Right now the text file is in an single dimension array so question(0) would be the question and question(6) would be the second question

[/ FileOpen(1, "quiz.txt", OpenMode.Input) 'open file to input all questions into an array
'Loop to input questions into array
Dim questions(Counter - 1) As String
For index As Integer = 0 To Counter - 1
Input(1, questions(index))

questionBox.Text = questions(0)

answerBtnA.Text = questions(1)
answerBtnB.Text = questions(2)
answerBtnC.Text = questions(3)
answerBtnD.Text = questions(4)


End Sub


Any help would be great, I am completely stuck

Is This A Good Question/Topic? 0
  • +

Replies To: Quiz program, array help

#2 tlhIn`toq   User is offline

  • Xamarin Cert. Dev.
  • member icon

Reputation: 6534
  • View blog
  • Posts: 14,450
  • Joined: 02-June 10

Re: Quiz program, array help

Posted 06 November 2012 - 09:41 AM

Please don't create multiple threads for the same question.
You already have a thread going for this:

Also, please follow the guidelines about using code tags just like everyone else.
We can't make it much more obvious than in the box where you typed your question.

Attached Image

If you check the homework help link in my signature block you'll see there is a section devoted to this common homework task of making a quiz program.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1