Guest User

Untitled

a guest
Nov 24th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. string l = Console.ReadLine();
  2. int counter = 0;
  3.  
  4. for (int i = 0; i < l.Length; i++)
  5. {
  6. counter++;
  7. string something = l.Substring(0,counter);
  8. // "Z" or "C" whatever just one character on the first iteration.
  9. string somethingElse = l.Substring(counter);
  10. // "ayne" or "odingame" because on the first iteration it starts at 1 because of counter. so it skips "Z" or "C"
  11. Console.WriteLine(somethingElse + something);
  12. }
  13. Console.ReadKey();
  14. }
Add Comment
Please, Sign In to add comment