CS
cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using System;
using System.Collections.Generic;
namespace Sololearn
{
class Program
{
static void Main(string[] args)
{
string input = "test";
for (int i = 0; i < 10; i++)
Console.WriteLine($"After shuffling: {Shuffle(input)}");
}
static string Shuffle(string input)
{
Random random = new Random();
int i = input.Length - 1;
char[] letters = input.ToCharArray();
while (i > 0)
{
//int r = random.Next(i--);
int r = random.Next(i);
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run