Advertisement
dinko_dt

Untitled

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