fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. // get input
  8. var input = 0;
  9. int.TryParse(Console.ReadLine(), out input);
  10.  
  11. // print first nth even numbers
  12. var counter = 0;
  13. while (counter < input)
  14. {
  15. counter++;
  16. Console.WriteLine(counter * 2);
  17. }
  18. }
  19. }
Success #stdin #stdout 0.02s 14808KB
stdin
10
stdout
2
4
6
8
10
12
14
16
18
20