Advertisement
Guest User

Untitled

a guest
Dec 16th, 2018
523
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _01ReverseStrings
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. string input = Console.ReadLine();
  10.  
  11. string reversed = null;
  12.  
  13.  
  14. while (input != "end")
  15. {
  16. input = Console.ReadLine();
  17.  
  18. for (int i = input.Length - 1; i >= 0; i--)
  19. {
  20. reversed += input[i];
  21. }
  22. }
  23. Console.WriteLine($"{input} = {reversed}");
  24. }
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement