aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS-TheRevival/TerminalApplications/External/MathQuiz/App_MathQuiz.vb
diff options
context:
space:
mode:
authorEverythingWindows <[email protected]>2022-11-27 20:58:48 +0700
committerEverythingWindows <[email protected]>2022-11-27 20:58:48 +0700
commitd7cdf48c58d3663550a88975747c3db04efe7c29 (patch)
tree36dbe323c79da65ac0abf8ce46839b2f3fe86bb7 /ShiftOS-TheRevival/TerminalApplications/External/MathQuiz/App_MathQuiz.vb
parentd09d7c947252a47adc866a69e6279121e272d000 (diff)
downloadshiftos-therevival-old-d7cdf48c58d3663550a88975747c3db04efe7c29.tar.gz
shiftos-therevival-old-d7cdf48c58d3663550a88975747c3db04efe7c29.tar.bz2
shiftos-therevival-old-d7cdf48c58d3663550a88975747c3db04efe7c29.zip
nice try on file skimmer lol
Diffstat (limited to 'ShiftOS-TheRevival/TerminalApplications/External/MathQuiz/App_MathQuiz.vb')
-rw-r--r--ShiftOS-TheRevival/TerminalApplications/External/MathQuiz/App_MathQuiz.vb54
1 files changed, 28 insertions, 26 deletions
diff --git a/ShiftOS-TheRevival/TerminalApplications/External/MathQuiz/App_MathQuiz.vb b/ShiftOS-TheRevival/TerminalApplications/External/MathQuiz/App_MathQuiz.vb
index 40ce30b..58ab882 100644
--- a/ShiftOS-TheRevival/TerminalApplications/External/MathQuiz/App_MathQuiz.vb
+++ b/ShiftOS-TheRevival/TerminalApplications/External/MathQuiz/App_MathQuiz.vb
@@ -17,34 +17,36 @@
End Sub
Public Sub MQ_GiveQuestion()
- Dim RandomNum As New Random
- MQ_1stNum = RandomNum.Next(1, 10)
- MQ_2ndNum = RandomNum.Next(1, 10)
- OperationChooser = RandomNum.Next(1, 5)
- Select Case OperationChooser
- Case 1
- MQ_Operation = " + "
- MQ_ShouldResult = MQ_1stNum + MQ_2ndNum
- Case 2
- While MQ_2ndNum >= MQ_1stNum
- MQ_2ndNum = RandomNum.Next(1, 10)
- End While
- MQ_Operation = " - "
- MQ_ShouldResult = MQ_1stNum - MQ_2ndNum
- Case 3
- MQ_Operation = " * "
- MQ_ShouldResult = MQ_1stNum * MQ_2ndNum
- Case 4
- While MQ_2ndNum > MQ_1stNum
+ Try
+ Dim RandomNum As New Random
+ MQ_1stNum = RandomNum.Next(1, 10)
+ MQ_2ndNum = RandomNum.Next(1, 10)
+ OperationChooser = RandomNum.Next(1, 5)
+ Select Case OperationChooser
+ Case 1
+ MQ_Operation = " + "
+ MQ_ShouldResult = MQ_1stNum + MQ_2ndNum
+ Case 2
+ While MQ_2ndNum >= MQ_1stNum
MQ_2ndNum = RandomNum.Next(1, 10)
End While
- MQ_Operation = " / "
- MQ_ShouldResult = MQ_1stNum / MQ_2ndNum
- Case Else
- MQ_Operation = " + "
- MQ_ShouldResult = MQ_1stNum + MQ_2ndNum
- End Select
- NewLine("What is " & MQ_1stNum & MQ_Operation & MQ_2ndNum & " ?")
+ MQ_Operation = " - "
+ MQ_ShouldResult = MQ_1stNum - MQ_2ndNum
+ Case 3
+ MQ_Operation = " * "
+ MQ_ShouldResult = MQ_1stNum * MQ_2ndNum
+ Case 4
+ While MQ_2ndNum > MQ_1stNum
+ MQ_2ndNum = RandomNum.Next(1, 10)
+ End While
+ MQ_Operation = " / "
+ MQ_ShouldResult = MQ_1stNum / MQ_2ndNum
+ End Select
+ NewLine("What is " & MQ_1stNum & MQ_Operation & MQ_2ndNum & " ?")
+ Catch ex As Exception
+ NewLine(ex.Message)
+ TerminateApp(Nothing)
+ End Try
End Sub
Public Sub MQ_CheckAnswer()