TRABAJO DE MODULO CASE NOMBRE: Barba Dennis CURSO: 6TO “G” Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim a, b, c, d As Integer a = TextBox1.Text b = TextBox2.Text c = TextBox3.Text d = TextBox4.Text d = d + a + b + c d = d / 4 Select Case d Case Is > 9 TextBox5.Text = Case Is > 7 TextBox5.Text = Case Is > 5 TextBox5.Text = Case Is > 3 TextBox5.Text = Case Is > 0 TextBox5.Text = Case Else TextBox5.Text = End Select End Sub ("Tipo de Calificasion A") ("Tipo de Calificasion B") ("Tipo de Calificasion C") ("Tipo de Calificasion D") ("Tipo de Calificasion E") "ERROR" Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click TextBox1.Text = "" TextBox2.Text = "" TextBox3.Text = "" TextBox4.Text = "" TextBox5.Text = "" End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click End End Sub End Class Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim a, b, c, d As Integer a = TextBox1.Text c = TextBox2.Text b = 5.0 d = 7.0 If a >= 40 Then a = a * b c = c * d a = a + c Else a = a * b End If TextBox3.Text = str(a) + " Dolares" 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 Sub End Class Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim a, b, c As Integer a = TextBox1.Text b = TextBox2.Text Select Case a Case Is = 12 TextBox3.Text = "América del Norte" TextBox4.Text = "2" TextBox5.Text = "srt(a)" + " Dolares" b = b * 2 Case Is = 15 TextBox3.Text = "América Cenral" TextBox4.Text = "2.2" TextBox5.Text = "srt(a)" + " Dolares" b = b * 2.2 Case Is = 18 TextBox3.Text = "América del Sur" TextBox4.Text = "2.4" TextBox5.Text = "srt(a)" + " Dolares" b = b * 2.4 Case Is = 19 TextBox3.Text = "Europa" TextBox4.Text = "3.5" TextBox5.Text = "srt(a)" + " Dolares" b = b * 3.5 Case Is = 23 TextBox3.Text = "Asía" TextBox4.Text = "6" TextBox5.Text = "srt(a)" + b = b * 6 Case Is = 25 TextBox3.Text = "Africa" TextBox4.Text = "6" TextBox5.Text = "srt(a)" + b = b * 6 Case Is = 29 TextBox3.Text = "Oceanía" TextBox4.Text = "5" TextBox5.Text = "srt(a)" + b = b * 5 End Select TextBox5.Text = Str(b) + " Dolares " Dolares" " Dolares" " Dolares" a Pagar" 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 = "" TextBox4.Text = "" TextBox5.Text = "" End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click End End Sub End Class Ejercicio N.- 4 Verifique si un número N es par o impar, Utilizando el operador MOD Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim a As Integer a = TextBox1.Text If a Mod 2 = 0 Then TextBox2.Text = " " + Str(a) + " Es Par" Else TextBox2.Text = " " + Str(a) + " Es Impar" End If End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click TextBox1.Text = "" TextBox2.Text = "" End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click End End Sub End Class Ejercicio N.- 5 Ingrese tres números por medio del teclado e imprima los mismos en forma orden descendente. Public Class Form2 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim a, b, c As Integer a = TextBox1.Text b = TextBox2.Text c = TextBox3.Text If (a < b) And (a < c) Then If b < c Then TextBox1.Text = a TextBox2.Text = b TextBox3.Text = c Else TextBox1.Text = a TextBox2.Text = c TextBox3.Text = b End If End If If (b < a) And (b < c) Then If a < c Then TextBox1.Text = b TextBox2.Text = a TextBox3.Text = c Else TextBox1.Text = b TextBox2.Text = c TextBox3.Text = a End If End If If (c < a) And (c < b) Then If a < b Then TextBox1.Text = c TextBox2.Text = a TextBox3.Text = b Else TextBox1.Text = c TextBox2.Text = b TextBox3.Text = a End If End If 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 Sub Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub End Class