Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string l = Console.ReadLine();
- int counter = 0;
- for (int i = 0; i < l.Length; i++)
- {
- counter++;
- string something = l.Substring(0,counter);
- // "Z" or "C" whatever just one character on the first iteration.
- string somethingElse = l.Substring(counter);
- // "ayne" or "odingame" because on the first iteration it starts at 1 because of counter. so it skips "Z" or "C"
- Console.WriteLine(somethingElse + something);
- }
- Console.ReadKey();
- }
Add Comment
Please, Sign In to add comment