using System.Collections.Generic;
public static void Main(string[] args)
Console.WriteLine ("Enter a random string");
str = Console.ReadLine();
Console.WriteLine($"entered string: {str}");
revStr = StringReverse(str);
Console.WriteLine($"Reversed string: {revStr}");
private static string StringReverse(string input){
string[] words = input.Split(' ');
List<string> revWords = new List<string>();
foreach(var word in words)
revWords.Add(new String(word.Reverse().ToArray()));
return string.Join(" ", revWords);