JulianJulianov

ReversedChars

Jan 29th, 2020
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _06ReversedChars
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. char symbol = ' ';
  10. string sumLetter = "";
  11. string reverse = "";
  12.  
  13. for (int i = 1; i <= 3; i++)
  14. {
  15. symbol = char.Parse(Console.ReadLine());
  16. sumLetter += (char)(symbol);
  17. if (i < 3 )
  18. {
  19. sumLetter += ' ';
  20. }
  21. }
  22. for (int r = sumLetter.Length -1; r >= 0; r--)
  23. {
  24. symbol = sumLetter[r];
  25. reverse += symbol;
  26. }
  27. Console.WriteLine(reverse);
  28. }
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment