Download - labo 2 -10

Transcript

Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim SEXO, EDAD As Integer Dim CAT As String SEXO = TextBox1.Text EDAD = TextBox2.Text If SEXO = 0 Then If EDAD < 23 Then CAT = "FA" Else : CAT = "FB" End If Else If EDAD < 25 Then CAT = "MA" Else CAT = "MB" End If End If TextBox3.Text = CAT End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click TextBox1.Text = "" TextBox2.Text = "" TextBox3.Text = "" End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click End End SubEnd Class


Top Related