Advertisement
tmollov

Untitled

Feb 8th, 2017
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Excersize
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. string lastDigit = Console.ReadLine();
  14. int stringLength = lastDigit.Length;
  15. Console.WriteLine(GetDigitWord(lastDigit, stringLength));
  16. }
  17. private static string GetDigitWord(string a, int b)
  18. {
  19. string result = "";
  20. for (int i = b - 1; i >= 0; i--)
  21. {
  22. result += a[i];
  23. }
  24. return result;
  25. }
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement