tanya_zheleva

Reverse Array

Jan 30th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.41 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ExamPreparation
  4. {
  5.     class Startup
  6.     {
  7.         static void Main()
  8.         {
  9.             int n = int.Parse(Console.ReadLine());
  10.             int[] numbers = new int[n];
  11.  
  12.             for (int i = n - 1; i >= 0; i--)
  13.             {
  14.                 numbers[i] = int.Parse(Console.ReadLine());
  15.             }
  16.  
  17.             Console.WriteLine(string.Join(" ", numbers));
  18.         }
  19.     }
  20. }
Add Comment
Please, Sign In to add comment