Task

Compute the sum and product of an array of integers.




' FB 1.05.0 Win64
 
Dim a(1 To 4) As Integer = {1, 4, 6, 3}
Dim As Integer i, sum = 0, prod = 1
For i = 1 To 4
  sum  += a(i)
  prod *= a(i)
Next
Print "Sum     ="; sum
Print "Product ="; prod
Print
Print "Press any key to quit"
Sleep