Microsoft Small Basic

Program Listing:
Embed this in your website
begin:
TextWindow.Clear()
TextWindow.WriteLine("Welcome to Basic Calculator!")
TextWindow.WriteLine("Put a number here.")
textwindow.write("")
num1 = TextWindow.ReadNumber()
TextWindow.Pause()
TextWindow.Clear()
TextWindow.WriteLine("Put another number here.")
TextWindow.Write("")
num2 = TextWindow.ReadNumber()
TextWindow.Pause()
TextWindow.Clear()
TextWindow.WriteLine("Enter an operation.(+,-,*./)")
TextWindow.Write("")
o = TextWindow.Read()
If(o= "+") Then
 num3 = num1 + num2
 TextWindow.WriteLine(num3)
ElseIf(o= "-") Then
  num3= num1 - num2
  TextWindow.WriteLine(num3)
ElseIf (o = "*") Then
  num3 = num1 * num2
  TextWindow.WriteLine(num3)
ElseIf ( o = "/") Then
  num3 = num1 / num2
  TextWindow.WriteLine(num3)
EndIf
TextWindow.Pause()
Textwindow.Clear()
TextWindow.WriteLine("Would you like to do another operation? (Y/N)")
TextWindow.Write("")

doagain = textwindow.read()

If(doagain= "y") Or (doagain = "Y") Then
  Goto begin
  EndIf


Copyright (c) Microsoft Corporation. All rights reserved.