LogiQuest
Back to Control Instructions
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

Discussion (0)

  • No discussion yet. Ask a doubt or share a shortcut.

Log in to join the discussion.