Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace simpleArrays
- {
- class Program
- {
- static void Main(string[] args)
- {
- List<int> nums = Console.ReadLine().Split().Select(int.Parse).ToList();
- List<int> res = new List<int>();
- res.Add(nums[0]);
- for (int i = nums.Count-2; i > 0; i--)
- {
- res.Add(nums[i]);
- }
- res.Add(nums[nums.Count-1]);
- Console.WriteLine(string.Join(" ",res));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement