Guest User

Untitled

a guest
Jul 18th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. using System;
  2. using System.Runtime.Serialization;
  3.  
  4. namespace SELECTED_MEMBERS
  5. {
  6. class Program
  7. {
  8. static void Main(string[] args)
  9. {
  10. int [] A = new int[10];
  11.  
  12. var k = Int32.Parse(Console.ReadLine());
  13.  
  14.  
  15. for (int i = 0; i < 10; i++)
  16. {
  17. A[i] = Int32.Parse(Console.ReadLine());
  18. }
  19.  
  20. Console.Write(A[0] + " ");
  21.  
  22. for (int i = 1; i <=10; i++)
  23. {
  24. if (A[i] != -1)
  25. {
  26. if (i % k == 0)
  27. {
  28. Console.Write(A[i] + " ");
  29. }
  30. }
  31. else
  32. {
  33. Console.Write(A[i] + " ");
  34. break;
  35. }
  36.  
  37. }
  38. }
  39. }
  40. }
Add Comment
Please, Sign In to add comment