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;
- using System.Threading.Tasks;
- namespace ArraysLab
- {
- class Program
- {
- static void Main(string[] args)
- {
- string[] arr = Console.ReadLine().Split(' ');
- string[] reversed = new string[arr.Length];
- for(int i = 0; i < arr.Length - 1; i++)
- {
- reversed[i + 1] = arr[i];
- }
- reversed[0] = arr[arr.Length - 1];
- Console.WriteLine(string.Join(" ",reversed));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment