Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Excersize
- {
- class Program
- {
- static void Main(string[] args)
- {
- string lastDigit = Console.ReadLine();
- int stringLength = lastDigit.Length;
- Console.WriteLine(GetDigitWord(lastDigit, stringLength));
- }
- private static string GetDigitWord(string a, int b)
- {
- string result = "";
- for (int i = b - 1; i >= 0; i--)
- {
- result += a[i];
- }
- return result;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement