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")
tt = cc + 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

Next
ListBox1.Items.Clear()
ara.Sort()
For Each I As Integer In ara
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

You must use the same structure than in the button1 on button 2 to fill also the ListBox2

``````ListBox1.Items.Clear()
ListBox2.Items.Clear()
tt = 0
ara.Sort()
For Each I As Integer In ara
tt += I
Next``````

Hope this helps

help me because i have an error to my computational to get the sum on listbox this is my code

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 finish As Integer = TextBox1.Text
Dim tempttave As Double
Dim ttaverage As Double

For start As Integer = 1 To finish
cc = InputBox("Enter No. of CC")
tt = tt + cc
wt = tt - cc

tempttave = tt + tt
TextBox2.Text = tempttave

Next

then the output to get the sum on listbox2

2
5
9
14
total 28 <=====Wrong instead 30 pls help me sir=(

Maybe you need to change

``tempttave = tt + tt``

by

``tempttave = tempttave + tt``

Hope this helps