Microsoft Small Basic

Program Listing:
Embed this in your website
TextWindow.Write( "Number: " )
n = TextWindow.ReadNumber()
TextWindow.Write( "Results: " )
While ( n > 1 )
  TextWindow.Write( n + " -> " )
  If Math.Remainder( n, 2 ) = 0  Then
    n = n / 2
  Else
    n = n * 3 + 1
  EndIf
EndWhile
TextWindow.WriteLine(1)
Copyright (c) Microsoft Corporation. All rights reserved.