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 EnglishNameOfTheLastDigits
- {
- class EnglishNameOFTheLAstDigits
- {
- static void Main()
- {
- EnglishName();
- }
- public static void EnglishName()
- {
- long num = long.Parse(Console.ReadLine());
- int digit = (int)Math.Abs(num % 10);
- Dictionary<int, string> lastNumber = new Dictionary<int, string>
- {
- [1] = "one",
- [2] = "two",
- [3] = "three",
- [4] = "four",
- [5] = "five",
- [6] = "six",
- [7] = "seven",
- [8] = "eight",
- [9] = "nine",
- [0] = "zero"
- };
- Console.WriteLine(lastNumber[digit]);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment