SHARE
TWEET

Lista C

a guest Apr 21st, 2019 89 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Public Class Form1
  2.     Dim X As Integer = 1
  3.     Dim Impares As Integer
  4.     Dim Pares As Integer
  5.     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
  6.         If X > 20 Then
  7.             Button1.Enabled = False
  8.             MsgBox(Impares)
  9.             MsgBox(Pares)
  10.         Else
  11.             ListBox1.Items.Insert(X, txtv1.Text)
  12.         End If
  13.         X += 1
  14.         For Cont As Integer = 1 To ListBox1.Items.Count
  15.             If (ListBox1.SelectedItem.Value / 2) <> 0 Then
  16.                 Impares += ListBox1.SelectedItem.Value
  17.             Else
  18.                 Pares += ListBox1.SelectedItem.Value
  19.             End If
  20.         Next
  21.     End Sub
  22. End Class
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top