Public Class Private Sub Byval As Byval As Handles End End Sub Private Sub Byval As Byval As Handles Dim As Integer As Integer As Integer As Integer

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Public Class Frmnum_mult

Private Sub Btosalir_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Btosalir.Click
End
End Sub
Private Sub btocalcular_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles btocalcular.Click
Dim res_5 As Integer, r_in As Integer, r_fin As Integer, num As
Integer
r_in = Val(txtr_in.Text)
r_fin = Val(txtr_fin.Text)
For num = r_in To r_fin Step 1
res_5 = num Mod 5
If res_5 = 0 Then
Lst_num.Items.Add("los numeros multiplos son:" & num)
End If
Next
End Sub
Private Sub Btolimpiar_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Btolimpiar.Click
txtr_fin.Text = ""
txtr_in.Text = ""
Lst_num.Items.Clear()
End Sub
End Class

Public Class frmprod


Private Sub btosalir_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btosalir.Click
End
End Sub
Private Sub Btocalcular_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Btocalcular.Click
Dim num_n As Integer, cont_exp As Integer, resul As Integer
For num_n = 1 To 100 Step 1
resul = 1
For cont_exp = 1 To 2 Step 1
resul = resul * num_n
Next
Lstresul.Items.Add("el produducto es:" & resul)
Next
End Sub
Private Sub btolimpiar_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles btolimpiar.Click
Lstresul.Items.Clear()
End Sub
End Class

You might also like