Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace EnglishNameOfLastDigit
- {
- class Program
- {
- static void Main(string[] args)
- {
- string[] digitNames = {"zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"};
- string input = Console.ReadLine();
- int lastDigit = int.Parse(input[input.Length - 1].ToString());
- Console.WriteLine(digitNames[lastDigit]);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment