kirililchev3

Reverse Array of Int

Jun 3rd, 2018
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.56 KB | None | 0 0
  1. namespace Reverse_Array_of_Integers
  2. {
  3.     using System;
  4.  
  5.     public class Reverse_Array_of_Integers
  6.     {
  7.         public static void Main(string[] args)
  8.         {
  9.             int n = int.Parse(Console.ReadLine());
  10.             int[] numbers = new int[n];
  11.  
  12.             for (int i = 0; i < numbers.Length; i++)
  13.             {
  14.                 numbers[i] = int.Parse(Console.ReadLine());
  15.             }
  16.  
  17.             for (int i = numbers.Length - 1; i >= 0; i--)
  18.             {
  19.                 Console.Write("{0} ", numbers[i]);
  20.             }
  21.         }
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment