Public Class Form6
Dim a, b As Integer
Function par(ByVal a As Integer, ByVal b As Integer) As String
If a Mod 2 = 0 Then
par = (a & " es numero par ")
Else
par = (a & " no es numero par ")
End If
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
a = TextBox1.Text
Label3.Text = par(a, b)
End Sub
End Class

No hay comentarios:
Publicar un comentario