Advertisement
tmollov

Untitled

Feb 19th, 2017
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace simpleArrays
  7. {
  8. class Program
  9. {
  10. static void Main(string[] args)
  11. {
  12. List<int> nums = Console.ReadLine().Split().Select(int.Parse).ToList();
  13. List<int> res = new List<int>();
  14. res.Add(nums[0]);
  15.  
  16. for (int i = nums.Count-2; i > 0; i--)
  17. {
  18. res.Add(nums[i]);
  19. }
  20. res.Add(nums[nums.Count-1]);
  21. Console.WriteLine(string.Join(" ",res));
  22. }
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement