Trying to calculate total sales for 5 items, 3 stores.
Here's a s/s of what Im getting, along with my code.
What am I missing/doing wrong?
(p.s. It's not returning an error code in 'debug')
Public Class Form1
Private Sub btnCalc_Click(sender As Object, e As EventArgs) Handles btnCalc.Click
Dim ttlsales As Double
'set up array data
Dim sales(,) As Integer = {{25, 64, 23, 45, 14},
{12, 82, 19, 34, 63},
{54, 22, 17, 43, 35}}
Dim price() As Double = {12.0, 17.95, 95.0, 86.5, 78.0}
'mark totals
Dim totals(2) As Double
For store As Integer = 0 To 2
For item As Integer = 0 To 4
Next
Next
'display output
lstOut.Items.Add("Sales Per Store")
For store As Integer = 0 To 2
lstOut.Items.Add(store + 1 & ":" &
FormatCurrency(totals(store)))
ttlsales += totals(store)
Next
lstOut.Items.Add("Total Sales: " &
FormatCurrency(ttlsales))
End Sub
End Class