0% found this document useful (0 votes)
30 views2 pages

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

This document contains code for two classes - Frmnum_mult and frmprod. The Frmnum_mult class contains code to calculate and list multiples of 5 between two numbers entered by the user. The frmprod class contains code to calculate the square of numbers from 1 to 100 and add them to a list. Both classes contain buttons to calculate the results, clear the list, and exit.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views2 pages

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

This document contains code for two classes - Frmnum_mult and frmprod. The Frmnum_mult class contains code to calculate and list multiples of 5 between two numbers entered by the user. The frmprod class contains code to calculate the square of numbers from 1 to 100 and add them to a list. Both classes contain buttons to calculate the results, clear the list, and exit.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 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