Public Class captura Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Me.Visible = False diagonal.ShowDialog() Me.Visible = True End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Me.Visible = False identidad.ShowDialog() Me.Visible = True End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Me.Visible = False nula.ShowDialog() Me.Visible = True End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click Me.Visible = False simetrica.ShowDialog() Me.Visible = True End Sub Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click Me.Visible = False traspuesta.ShowDialog() Me.Visible = True End Sub Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click End End Sub Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click Me.Visible = False trian_superior.ShowDialog() Me.Visible = True End Sub Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click Me.Visible = False trian_inferior.ShowDialog() Me.Visible = True End Sub End Class
Public Class diagonal Dim fila, columna As Integer Dim matriz(fila, columna) Dim D(10, 10) As Integer Dim DATO, TAMAÑO As Integer Dim contador, cont, resultado As Integer Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click cont = 0 contador = 0 fila = Val(TextBox1.Text) columna = Val(TextBox2.Text) For DATO = 1 To fila For TAMAÑO = 1 To columna D(DATO, TAMAÑO) = InputBox("INSERTAR ELEMENTO A (" & DATO & "),(" & TAMAÑO & ")") If DATO = TAMAÑO Then If D(DATO, TAMAÑO) <> 0 Then contador = contador + 1 End If Else If D(DATO, TAMAÑO) = 0 Then cont = cont + 1 End If End If Next Next resultado = (fila * columna) - fila If (contador = fila) And (cont = resultado) Then MessageBox.Show("la matriz es Diagonal") Else MessageBox.Show("la matriz no es Diagonal") End If End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Me.Visible = False captura.Visible = True End Sub End Class
Public Class identidad Dim fila, columna As Integer Dim matriz(fila, columna) Dim D(10, 10) As Integer Dim DATO, TAMAÑO As Integer Dim contador As Integer Dim cont, resultado As Integer Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click cont = 0 contador = 0 fila = Val(TextBox1.Text) columna = Val(TextBox2.Text) For DATO = 1 To fila For TAMAÑO = 1 To columna D(DATO, TAMAÑO) = InputBox("INSERTAR ELEMENTO A (" & DATO & ") , (" & TAMAÑO & ")") If DATO = TAMAÑO Then If D(DATO, TAMAÑO) = 1 Then cont = cont + 1 End If Else If D(DATO, TAMAÑO) = 0 Then contador = contador + 1 End If End If Next Next resultado = (fila * columna) - fila If (cont = fila) And (contador = resultado) Then MessageBox.Show("la matriz es identidad") Else MessageBox.Show("la matriz no es Identidad") End If End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Me.Visible = False captura.Visible = True End Sub End Class
Public Class nula Dim Dim Dim Dim Dim
fila, columna As Integer matriz(fila, columna) D(10, 10) As Integer DATO, TAMAÑO As Integer contador As Integer
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Me.Visible = False captura.Visible = True End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click fila = Val(TextBox1.Text) columna = Val(TextBox2.Text) For DATO = 1 To fila For TAMAÑO = 1 To columna D(DATO, TAMAÑO) = InputBox("INSERTAR ELEMENTO A (" & DATO & "),(" & TAMAÑO & ")") If D(DATO, TAMAÑO) <> 0 Then contador = contador + 1 End If Next Next If contador = 0 Then MessageBox.Show("la matriz es Nula") Else MessageBox.Show("la matriz no es Nula") End If contador = 0 End Sub End Class
Public Class simetrica Dim fila, columna As Integer Dim D(10, 10) As Integer Dim T(10, 10) As Integer Dim DATO, TAMAÑO As Integer Dim contador As Integer Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click fila = Val(TextBox1.Text) columna = Val(TextBox2.Text) For DATO = 1 To fila For TAMAÑO = 1 To columna D(DATO, TAMAÑO) = InputBox("INSERTAR ELEMENTO A (" & DATO & "),(" & TAMAÑO & ")") T(TAMAÑO, DATO) = D(DATO, TAMAÑO) Next Next For DATO = 1 To fila For TAMAÑO = 1 To columna If T(DATO, TAMAÑO) = D(DATO, TAMAÑO) Then contador = contador + 1 End If Next Next If contador = (fila * columna) Then MessageBox.Show("la matriz es simetrica") Else MessageBox.Show("la matriz NO es Simetrica") End If contador = 0 End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Me.Visible = False captura.Visible = True End Sub End Class
Public Class traspuesta Dim fila, columna As Integer Dim D(10, 10) As Integer Dim DATO, TAMAÑO As Integer Dim T(10, 10) As Integer Dim matriz, matriz1 As String Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Me.Visible = False captura.Visible = True End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click matriz = "" fila = Val(TextBox1.Text) columna = Val(TextBox2.Text) For DATO = 1 To fila For TAMAÑO = 1 To columna D(DATO, TAMAÑO) = InputBox("INSERTAR ELEMENTO A (" & DATO & "),(" & TAMAÑO & ")") T(TAMAÑO, DATO) = D(DATO, TAMAÑO) Next Next For DATO = 1 To fila For TAMAÑO = 1 To columna If TAMAÑO = fila Then matriz = matriz & vbNewLine matriz1 = matriz1 vbNewLine Else matriz = matriz & matriz1 = matriz1 End If Next Next
(T(DATO, TAMAÑO)) & "
" &
& (D(DATO, TAMAÑO)) & " (T(DATO, TAMAÑO)) & " & (D(DATO, TAMAÑO)) & "
" & "
MessageBox.Show(matriz1 + vbNewLine + vbNewLine + matriz) End Sub End Class
"