Microsoft Small Basic

Program Listing:
Embed this in your website
start:
Textwindow.Clear()
textwindow.Write("Loading ...")
TextWindow.WriteLine(" ")
TextWindow.Write("Choose your Time Table!")
timetable = TextWindow.Read()
For i = 1 to 12
  TextWindow.ForegroundColor = "red"
  TextWindow.Write (i)
  TextWindow.Write (" times ")
  TextWindow.Write (timetable)
  TextWindow.Write (" = ")
  TextWindow.Write (timetable*i)
  TextWindow.WriteLine(" ")
endfor
TextWindow.Write("Test (Y/N)?")
answer = TextWindow.Read()
If(answer = "y") then
  Goto test
Else
endif
TextWindow.Write("New Time Table (Y/N)?")
new = TextWindow.Read()
If (new = "y") then
  Goto start
Else
endif
test:
TextWindow.Clear()
score = 0
For i = 1 to 24
  result = Math.GetRandomNumber(12)
  TextWindow.Write(result)
  TextWindow.Write(" times ")
  TextWindow.Write(timetable)
  TextWindow.Write(" = ?")
  ans = TextWindow.Read()
  If(ans = timetable*result) Then
    textwindow.Write("Correct!")
    score=score+1
    TextWindow.Write(score)
    TextWindow.Write(" Correct so far ")
    TextWindow.WriteLine(" ")
  endif
endfor
TextWindow.Write(score)
TextWindow.Write(" Correct Out Of 24")
TextWindow.WriteLine(" ")
TextWindow.Write("Test Again (Y/N)?")
testag = TextWindow.Read()
If(testag = "y") Then
  Goto test
Else
EndIf
TextWindow.Write("Choose Another Timetable (Y/N)?")
another = TextWindow.Read()
If(another = "y") Then
  Goto start
Else
EndIf
Copyright (c) Microsoft Corporation. All rights reserved.