tanya_zheleva

Reverse Array of Strings

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