Microsoft Small Basic

Program Listing: FHB571
Setup()
Sub Setup
GraphicsWindow.Title = "What is life?"
GraphicsWindow.Width = 200
GraphicsWindow.Height = 150
x = 25
y1 = 25
y2 = 100
currentY = y1
answer = Controls.AddButton("Click here for answer", x, currentY)
Controls.ButtonClicked = ButtonClicked
EndSub
Sub ButtonClicked
If(Controls.LastClickedButton = answer) Then
If(currentY = y1) Then
Controls.Move(answer, x, y2)
currentY = y2
ElseIf(currentY = y2) Then
Controls.Move(answer, x, y1)
currentY = y1
EndIf
EndIf
EndSub