Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- namespace Algorithms
- {
- class Program
- {
- static void Main(string[] args)
- {
- var symbols = Console.ReadLine().Split(' ').ToArray();
- PrintReversedSymbols(symbols, 0);
- }
- private static void PrintReversedSymbols(string[] symbols, int index)
- {
- if (index >= symbols.Length)
- {
- return;
- }
- PrintReversedSymbols(symbols, index + 1);
- Console.Write($"{symbols[index]} ");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment