Microsoft Small Basic

Program Listing:
Embed this in your website
' Calculate largest prime number in 1 minute
' Copyright (c) 2013 Nonki Takahashi. All rights reserved.
'
' History:
' 0.1 2013-12-08 Created.
'
Timer.Interval = 60000
Timer.Tick = OnTick
Not = "True=False;False=True;"
For trial = 1 To 5
  TextWindow.Write("Trial " + trial + " " + Clock.Time)
  in1min = "True"
  p = ""
  n = 1
  p[n] = 2
  While in1min
    nextp = p[n]
    FindNextPrime()
    n = n + 1
    p[n] = nextp
  EndWhile
  TextWindow.WriteLine(" Largest prime [" + n + "] is " + p[n] + ".")
EndFor
Sub FindNextPrime
  ' param nextp - previous prime
  ' returns nextp - next prime
  found = "False"
  While Not[found]
    isPrime = "True"
    nextp = nextp + 1
    i = 1
    While isPrime And i <= n
      If Math.Remainder(nextp, p[i]) = 0 Then
        isPrime = "False"
      EndIF
      i = i + 1
    EndWhile
    If isPrime Then
      found = "True"
    EndIf
  EndWhile
EndSub
Sub OnTick
  in1min = "False"
EndSub
Copyright (c) Microsoft Corporation. All rights reserved.