Advertisement
NelIfandieva

PrintArrayBackwards

Oct 29th, 2019
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.53 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3.  
  4. namespace ConsoleApp210
  5. {
  6.     class Program
  7.     {
  8.         static void Main()
  9.         {
  10.             int length = int.Parse(Console.ReadLine());
  11.  
  12.             string[] nums = new string[length];
  13.  
  14.             for (int i = 0; i < nums.Length; i++)
  15.             {
  16.                 nums[i] = Console.ReadLine();
  17.             }
  18.  
  19.             for (int k = nums.Length - 1; k >= 0; k--)
  20.             {
  21.                 Console.Write("{0} ", nums[k]);
  22.             }
  23.         }
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement