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