You may need to declare your countvariable before using it on the loop. You can do it in the same line where you declare your For...Next loop.
Change For count = 0 To 4 for For count As Integer = 0 To 4. This may make the error disappear.
EDIT: I have been looking at your code, and there are some mistakes that should be corrected if you want it to function properly.
First of all, you need to change the way you declare your arrays since you are telling that the elements inside of them are Integer and using ". You need to remove those quotes from all the array declarations, as well as declaring the last one as decimal, since the data is not integer nor string:
Dim Trainup_times() As Integer = {9,11,13,15}
Dim Trainup_tickets() As Integer = {480,480,480,480}
Dim Trainup_money() As Decimal = {0.0,0.0,0.0,0.0}
Dim Traindown_times() As Integer = {10,12,14,16}
Dim Traindown_tickets() As Integer = {480,480,480,640}
Dim Traindown_money() As Decimal = {0.0,0.0,0.0,0.0}
You also need to rewrite the loop declaration, since you need to declare count as I told you before, and also loop only from 0 to 3, since you arrays have 4 elements, not 5:
For count as integer = 0 To 3
Finally, if you need your output to be displayed into the same window, I'd recommend using Console.WriteLine function to do it.
For count as integer = 0 To 3
console.writeline(Trainup_times(count) & " " & Trainup_tickets(count) & " " & Trainup_money(count) )
console.writeline(Traindown_times(count) & " " & Traindown_tickets(count) & " " & Traindown_money(count) )
console.writeline("-------------------------")
Next
All together it would look like this:
Module VBModule
Sub Main()
Dim Ticket_Cost As Decimal
Ticket_Cost = 25.0
Dim Trainup_times() As Integer = {9,11,13,15}
Dim Trainup_tickets() As Integer = {480,480,480,480}
Dim Trainup_money() As Decimal = {0.0,0.0,0.0,0.0}
Dim Traindown_times() As Integer = {10,12,14,16}
Dim Traindown_tickets() As Integer = {480,480,480,640}
Dim Traindown_money() As Decimal = {0.0,0.0,0.0,0.0}
For count as integer = 0 To 3
console.writeline(Trainup_times(count) & " " & Trainup_tickets(count) & " " & Trainup_money(count) )
console.writeline(Traindown_times(count) & " " & Traindown_tickets(count) & " " & Traindown_money(count) )
console.writeline("-------------------------")
Next
End Sub
End Module
Try this out and let's see if it Works for you! =)
{"9,11,13,15"}. Then, you needFor count As Integer = 0 To 3: you have only 4 elements per array, not 5.Traindown_money()will be an array of single or double, not integer values. -- ThePrintLine()syntax is probably wrorg.Trainup_money()andTraindown_money()should be Single, Double or Decimal? Do you need to write this to a file? Also, do you need this code to compile for VB6 or VB.Net? Pick one.count. You do that with adimstatement.