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;
- using System.Threading.Tasks;
- namespace _02.RandomizeWords
- {
- class RandomizeWords
- {
- static void Main(string[] args)
- {
- List<string> input = Console.ReadLine().Split().ToList();
- Random rnd = new Random();
- List<string> result = new List<string>();
- while (input.Count() > 0)
- {
- var random = rnd.Next(0, input.Count());
- result.Add(input[random]);
- input.RemoveAt(random);
- }
- Console.WriteLine(string.Join("\r\n", result));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement