hi pls help me i have error to my code in shortest job next
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim cc As Integer
Dim tt As Integer
Dim wt As Integer
Dim ryan As Integer = TextBox1.Text
For escal As Integer = 1 To ryan
cc = InputBox("Enter no. of CC")
ListBox1.Items.Add(cc)
tt = cc + tt
ListBox2.Items.Add(tt)
Next
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim ara As List(Of Integer) = New List(Of Integer)
For Each S As String In ListBox1.Items
ara.Add(CInt(S))
Next
ListBox1.Items.Clear()
ara.Sort()
For Each I As Integer In ara
ListBox1.Items.Add(I)
Next
and then then the output:
cc tt
10 10
8 18
5 23
2 25
if i sort the cc
cc tt
2 10 <-------ERROR =(
5 18
8 23
10 25
my error is my computational pls help me