0% found this document useful (0 votes)
45 views3 pages

Codigo Calculadora

The document contains code for a basic calculator application. It defines variables to store numbers entered and the selected operation. Buttons are included for numbers 0-9, operations like addition and subtraction, and functions like clear and memory. When the equals button is pressed, the code evaluates the operation based on the stored variable and displays the result.

Uploaded by

Denzel Verley
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views3 pages

Codigo Calculadora

The document contains code for a basic calculator application. It defines variables to store numbers entered and the selected operation. Buttons are included for numbers 0-9, operations like addition and subtraction, and functions like clear and memory. When the equals button is pressed, the code evaluates the operation based on the stored variable and displays the result.

Uploaded by

Denzel Verley
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Dim m As Integer

Dim s As Integer
Dim r As Integer
Dim x As Integer
Dim d As Integer
Dim op As Integer

Botones de 0-9
Botones

Tb1.Text = Tb1.Text + Bt1.Text

Botones
Tb1.Text = Tb1.Text + Bt2Text

Botones
Tb1.Text = Tb1.Text + Bt3Text

Botones
Tb1.Text = Tb1.Text + Bt6Text

Botones
Tb1.Text = Tb1.Text + Bt7Text

Botones
Tb1.Text = Tb1.Text + Bt8Text

Botones
Tb1.Text = Tb1.Text + Bt11Text

Botones
Tb1.Text = Tb1.Text + Bt12Text

Botones
Tb1.Text = Tb1.Text + Bt13Text

Botones
Tb1.Text = Tb1.Text + Bt16Text
Botones
Tb1.Text = Tb1.Text + Bt17Text

Boton suma
s = Tb1.Text
op = 1
Tb1.Clear()

Boton resta
r = Tb1.Text
op = 2
Tb1.Clear()

Bot�n multiplicaci�n
x = Tb1.Text
op = 3
Tb1.Clear()

Boton division
d = Tb1.Text
op = 4
Tb1.Clear()

Boton igual
Se hacen todas las operaciones
If op = 1 Then
Tb1.Text = Int(Tb1.Text) + s
End If

If op = 2 Then
Tb1.Text = r - Int(Tb1.Text)

End If

If op = 3 Then
Tb1.Text = Int(Tb1.Text) * x
End If
If op = 4 Then
Tb1.Text = d / Int(Tb1.Text)
End If

End Sub

Boton AC
Tb1.Text = "0"
Tb1.Clear()
End Sub

Boton M+
m = Tb1.Text
Tb1.Clear()
C�digo generado

Boton MR
Tb1.Text = m

You might also like