Microsoft Small Basic

Program Listing:
Embed this in your website
inceput:
TextWindow.Write("Indicati primul numar: ")
a=TextWindow.ReadNumber()
TextWindow.Write("Indicati al doilea numar: ")
b=TextWindow.ReadNumber()
TextWindow.WriteLine("Putem efectua urmatoarele operatii:")
TextWindow.WriteLine("1. Adunare")
TextWindow.WriteLine("2. Scadere")
TextWindow.WriteLine("3. Inmultire")
TextWindow.WriteLine("4. Impartire")
TextWindow.WriteLine("5. Putere")
TextWindow.WriteLine("0. Iesire")
TextWindow.Write("Alegeti operatia: ")
operatia=TextWindow.ReadNumber()
If operatia=0 Then
  Goto final
EndIf
If operatia=1 Then
  TextWindow.WriteLine("Ati ales adunare: "+a+"+"+b+"="+(a+b))
EndIf
If operatia=2 Then
  TextWindow.WriteLine("Ati ales scadere: "+a+"-"+b+"="+(a-b))
EndIf
If operatia=3 Then
  TextWindow.WriteLine("Ati ales inmultire: "+a+"*"+b+"="+(a*b))
EndIf
If operatia=4 Then
  TextWindow.WriteLine("Ati ales impartire : "+a+"/"+b+"="+(a/b))
EndIf
If operatia=5 Then
  TextWindow.WriteLine("Ati ales putere: "+a+" la puterea "+b+"="+Math.Power(a,b))
EndIf
Goto inceput
final:
Copyright (c) Microsoft Corporation. All rights reserved.