- Imports Microsoft
- Imports System
- Module Module1
- Dim Score As Integer
- Sub Main()
- Console.WriteLine("Welcome to the first version of Spacey's trivia")
- Static I As Integer
- I = 0
- Static Questions(10) As String
- Questions(1) = "The answer to this question is test"
- Questions(2) = "This is the second question, the answer to this question is test2"
- Questions(3) = "This is the third question, and the answer to this is test3"
- Static QAnswers(10) As String
- QAnswers(1) = "Test"
- QAnswers(2) = "Test2"
- QAnswers(3) = "Test3"
- Static Question As String
- Static QAnswer As String
- For I = 1 To 10
- Question = Questions(I)
- QAnswer = QAnswers(I)
- If Input() = QAnswer Then
- Static Input = Console.ReadLine
- Console.WriteLine(Question)
- Input = ""
- Input = Console.ReadLine
- Console.WriteLine("That is the correct answer")
- 'I = +1
- Else
- Console.WriteLine("That is incorrect, one point will be subtracted from your score")
- Score = -1
- I = +1
- Console.WriteLine(Question)
- Input = ""
- Input = Console.ReadLine
- End If
- Next I
- End Sub
- End Module

By: Spacey | Date: Sep 29 2006 09:48 | Format: None | Expires: never | Size: 1.38 KB | Hits: 1379
Latest pastes
9 hours ago
18 hours ago
1 days ago
1 days ago
2 days ago