Question #26371

How do you intialise arrays to set three group totals and increment these totals for the appropriate group in visual basic?

Expert's answer

Module Module1

Sub Main()
'Intialise arrays to set three group totals
Dim arraygrouptotals(3) As Integer
arraygrouptotals(0) += 1 'increment these totals for the appropriate group 1
arraygrouptotals(1) += 1 'increment these totals for the appropriate group 2
arraygrouptotals(2) += 1 'increment these totals for the appropriate group 3
Console.WriteLine(arraygrouptotals(0)) 'show 1
Console.WriteLine(arraygrouptotals(1)) 'show 2
Console.WriteLine(arraygrouptotals(2)) 'show 3
Console.ReadLine()
End Sub

End Module

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS