0% found this document useful (0 votes)
42 views

Pseudocodigo Calculadora

This document contains the code for a basic calculator application. It defines variables to store numeric values and operation types entered by the user. It also includes event handler subroutines for each of the number and operator buttons that update the displayed value in a text box. The equal button subroutine performs the calculation based on the stored values and operation type and displays the result.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views

Pseudocodigo Calculadora

This document contains the code for a basic calculator application. It defines variables to store numeric values and operation types entered by the user. It also includes event handler subroutines for each of the number and operator buttons that update the displayed value in a text box. The equal button subroutine performs the calculation based on the stored values and operation type and displays the result.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

Public Class Form1

Dim DATO As Double


Dim DATO2 As Double
Dim RESUL As Double
Dim OPE As Double
Dim BTS As Double
Private Sub BT17_Click(sender As Object, e As EventArgs) Handles BT17.Click
TextBox1.Clear()
BT2.Enabled = True
End Sub

Private Sub BT1_Click(sender As Object, e As EventArgs) Handles BT1.Click


TextBox1.Text = TextBox1.Text & "0"
End Sub

Private Sub BT2_Click(sender As Object, e As EventArgs) Handles BT2.Click


TextBox1.Text = TextBox1.Text & "."
BTS = 1
If BTS = 1 Then
BT2.Enabled = False
End If
End Sub

Private Sub BT5_Click(sender As Object, e As EventArgs) Handles BT5.Click


TextBox1.Text = TextBox1.Text & "1"
End Sub

Private Sub BT6_Click(sender As Object, e As EventArgs) Handles BT6.Click


TextBox1.Text = TextBox1.Text & "2"
End Sub

Private Sub BT7_Click(sender As Object, e As EventArgs) Handles BT7.Click


TextBox1.Text = TextBox1.Text & "3"
End Sub

Private Sub BT9_Click(sender As Object, e As EventArgs) Handles BT9.Click


TextBox1.Text = TextBox1.Text & "4"
End Sub

Private Sub BT10_Click(sender As Object, e As EventArgs) Handles BT10.Click


TextBox1.Text = TextBox1.Text & "5"
End Sub

Private Sub BT11_Click(sender As Object, e As EventArgs) Handles BT11.Click


TextBox1.Text = TextBox1.Text & "6"
End Sub

Private Sub BT13_Click(sender As Object, e As EventArgs) Handles BT13.Click


TextBox1.Text = TextBox1.Text & "7"
End Sub

Private Sub BT14_Click(sender As Object, e As EventArgs) Handles BT14.Click


TextBox1.Text = TextBox1.Text & "8"
End Sub

Private Sub BT15_Click(sender As Object, e As EventArgs) Handles BT15.Click


TextBox1.Text = TextBox1.Text & "9"
End Sub
Private Sub BT16_Click(sender As Object, e As EventArgs) Handles BT16.Click
OPE = 1
DATO = Val(TextBox1.Text)
TextBox1.Clear()
End Sub

Private Sub BT3_Click(sender As Object, e As EventArgs) Handles BT3.Click


DATO2 = Val(TextBox1.Text)
BT2.Enabled = True
If OPE = 1 Then
RESUL = DATO + DATO2
TextBox1.Text = RESUL
Else
If OPE = 2 Then
RESUL = DATO - DATO2
TextBox1.Text = RESUL
Else
If OPE = 3 Then
RESUL = DATO * DATO2
TextBox1.Text = RESUL
Else
If OPE = 4 Then
RESUL = DATO / DATO2
TextBox1.Text = RESUL
End If
End If
End If
End If
End Sub

Private Sub BT12_Click(sender As Object, e As EventArgs) Handles BT12.Click


OPE = 2
DATO = Val(TextBox1.Text)
TextBox1.Clear()
BT2.Enabled = True
End Sub

Private Sub BT8_Click(sender As Object, e As EventArgs) Handles BT8.Click


OPE = 3
DATO = Val(TextBox1.Text)
TextBox1.Clear()
BT2.Enabled = True
End Sub

Private Sub BT4_Click(sender As Object, e As EventArgs) Handles BT4.Click


OPE = 4
DATO = Val(TextBox1.Text)
TextBox1.Clear()
BT2.Enabled = True
End Sub
End Class

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy