Visual Basic - Numeros pares y primos

Life is soft - evento anual de software empresarial
 
Vista:
sin imagen de perfil

Numeros pares y primos

Publicado por Heiver (1 intervención) el 15/04/2012 23:31:35
Hola a todos...
tengo el siguiente codigo
Public Class Form1


Private Sub BOTOCALC_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BOTOCALC.Click
Dim I, c, d As Integer
'd = Nothing
For I = Val(CAJANUM1.Text) To Val(CAJANUM2.Text)
If (I / 2 Mod 0) Then
CAJAPAR.Multiline = True
CAJAPAR.ScrollBars = ScrollBars.Vertical
CAJAPAR.Text = I & Environment.NewLine & I

End If
Next I


End Sub

Private Sub BOTOLIMP_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BOTOLIMP.Click
CAJANUM1.Text = Nothing
CAJANUM2.Text = Nothing
CAJAPAR.Text = Nothing
CAJAPRIM.Text = Nothing
CAJANUM1.Focus()
End Sub

Private Sub BOTOSALI_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BOTOSALI.Click
End
End Sub

End Class
digito dos numeros por decir 4 y 10 y en una caja de tecto me tiene q mostrear que numeros entre 4 y 10 son pares
creo q asi seria pero algo pasa con el multiline y solo me muestra el ultimo numero agradezco su ayuda
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder