Imports System, Microsoft.VisualBasic
Dim a As Integer= Int(rnd()*(10-1+1)+1)
Dim b As Integer= Int(rnd()*(10-1+1)+1)
Dim sum, difference,product As Integer
Dim percentage As Integer
Console.WriteLine("Time for a Math Quiz! Evaluate each expression, and find out how good you are at math!")
Console.WriteLine(a &"+"& b)
userAnswer=Console.ReadLine()
If userAnswer <> sum then
Console.WriteLine("Sorry your answer is not correct, the correct answer is "& sum)
ElseIf userAnswer= sum then
Console.WriteLine("Your answer is correct!")
ElseIf userAnswer= sum then
Console.WriteLine(a &"-"& b)
userAnswer= Console.ReadLine()
If userAnswer <> difference then
console.WriteLine("Sorry, your answer is not correct, the correct answer is "& difference)
ElseIf userAnswer = difference then
Console.WriteLine("Your answer is correct!")
ElseIf userAnswer = difference then
Console.WriteLine(a &"*"& b)
userAnswer= Console.ReadLine()
If userAnswer <> product then
Console.WriteLine("Sorry, your answer is not correct, the correct answer is "& product)
ElseIf userAnswer = product then
Console.WriteLine("Your answer is correct!")
ElseIf userAnswer = product then
Console.WriteLine(a &"/"& b)
If userAnswer <> quotient then
Console.WriteLine("Sorry, your answer is not correct, the correct answer is "& quotient)
ElseIf userAnswer = quotient then
Console.WriteLine("Your answer is correct!")
ElseIf userAnswer = quotient then
Console.WriteLine("You got "& score & " correct!")
Console.Write("That's "& percentage & "% !")