Advertisement
desislava_topuzakova

03

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