Loading |
VBScript |
JavaScript |
Powershell |
Search Options: 2008 Scripting Games Advanced VBScript Event 6Content of 2008 Scripting Games Advanced VBScript Event 6.vbsMD5 Hash: C3F4E667D6EE9CC0069B7F0D9D3034D6 |
||
' This is my Solution for the Scripting Games 2008
' For more Information look at ' http://www.microsoft.com/technet/scriptcenter/funzone/games/games08.mspx Option Explicit Call Main ' ------------------------------------------------------- Sub Main() Dim strPrimes Dim iCount For iCount = 2 to 200 If IsPrimeNumber(iCount) = true then strPrimes = strPrimes & iCount & ", " End if Next If Len(strPrimes) then strPrimes = Left(strPrimes, Len(strPrimes) -2) msgbox strPrimes, 64, "The Prime-Numbers between 1-200 are:" End if End Sub ' ------------------------------------------------------- Private Function IsPrimeNumber(iNumber) Dim iCount For iCount = 2 To iNumber - 1 If iNumber Mod iCount = 0 Then IsPrimeNumber = False Exit Function End If Next IsPrimeNumber = True End Function | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |