Sum and product of an array: Difference between revisions
Content deleted Content added
No edit summary |
|||
Line 2,758: | Line 2,758: | ||
=={{header|Vala}}== |
=={{header|Vala}}== |
||
<lang Vala>void main() { |
<lang Vala>void main() { |
||
int sum=0, prod = 1; |
int sum = 0, prod = 1; |
||
int[] data = { 1, 2, 3, 4 }; |
int[] data = { 1, 2, 3, 4 }; |
||
foreach (int val in data) { |
foreach (int val in data) { |