4
What is the output of the following program?
int[] nums = { 2, 4, 6 };
int sum = 0;
foreach (var n in nums) sum += n;
Console.WriteLine(sum);Easy
What is the output of the following program?
int[] nums = { 2, 4, 6 };
int sum = 0;
foreach (var n in nums) sum += n;
Console.WriteLine(sum);Log in to join the discussion.