fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. static int method(params int[] x)
  6. {
  7. int z = 0;
  8. foreach(int d in x)
  9. {
  10. z += d;
  11. }
  12. return z;
  13. }
  14. public static void Main()
  15. {
  16. int a = 2;
  17. Console.WriteLine("{0:d2}, {1:d2}", method(a, ++a, a + 2, 3), method(3, 2, ++a));
  18. }
  19. }
Success #stdin #stdout 0.03s 33912KB
stdin
Standard input is empty
stdout
13, 09