Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2020
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ильяс_демон
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. int b = Convert.ToInt32(Console.ReadLine());
  10. int[] m = new int[b];
  11. for (int i = 0; i < b;i++)
  12. {
  13. int c = Convert.ToInt32(Console.ReadLine());
  14. m[i] = c;
  15. }
  16. for (int k = 0; k < b / 2; k++)
  17. {
  18. int g = 0;
  19. int j = b-1;
  20. int z = m[g];
  21. int x = m[j];
  22. m[g] = x;
  23. m[j] = z;
  24. g = g + 1;
  25. j = j + 1;
  26. }
  27.  
  28. foreach (int i in m)
  29. {
  30. Console.WriteLine(i);
  31. }
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39. }
  40. }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement