martes, 17 de junio de 2014

Examen de las tablas demultiplicar Andrea









24-6-2014
 

Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim a, b, x, y, c, d As Integer
        Dim w As String
        a = Val(InputBox("indique en la tabla de multiplicar desea evaluarse", "tabla", 0))
        If a <> 0 Then
            For x = 1 To 10
                b = a * x
                w = "deme el valor de la operacion de " & a & " por" & x
                y = Val(InputBox(w, "examen", 0))
                If y <> 0 Then
                    If y = b Then
                        MsgBox("usted a acertado", MsgBoxStyle.Information + MsgBoxStyle.OkOnly, "bien hecho")
                        c = c + 1
                    Else
                        MsgBox("usted se ha equivocado", MsgBoxStyle.OkOnly + MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, "mejor para la proxima")
                        d = d + 1
                    End If
                    TextBox1.Text = TextBox1.Text & a & "x" & x & "=" & b & vbCrLf
                Else
                    MsgBox("usted cancelo el proceso", MsgBoxStyle.OkOnly + MsgBoxStyle.Information, "cancelar")
                    End
                End If
            Next
            Label2.Text = "el numero total de aciertos es " & c
            Label3.Text = "el numero total de fallas es " & d
        Else
            MsgBox("usted cancelo el proceso", MsgBoxStyle.OkOnly + MsgBoxStyle.Information, "cancelar")
            End
        End If
    End Sub
End Class








 




No hay comentarios.:

Publicar un comentario