Advertisement
fbinnzhivko

20. English Name Of The Last

May 19th, 2016
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.05 KB | None | 0 0
  1. using System;
  2. class Program
  3. {
  4.     static void Main()
  5.     {
  6.         string n = Console.ReadLine();
  7.  
  8.         char a = n[n.Length - 1];
  9.         //Console.WriteLine(a);
  10.  
  11.         if (a =='1')
  12.         {
  13.             Console.WriteLine("one");
  14.         }
  15.         else if (a == '2')
  16.         {
  17.             Console.WriteLine("two");
  18.         }
  19.         else if (a == '3')
  20.         {
  21.             Console.WriteLine("three");
  22.         }
  23.         else if (a == '4')
  24.         {
  25.             Console.WriteLine("four");
  26.         }
  27.         else if (a == '5')
  28.         {
  29.             Console.WriteLine("five");
  30.         }
  31.         else if (a == '6')
  32.         {
  33.             Console.WriteLine("six");
  34.         }
  35.         else if (a == '7')
  36.         {
  37.             Console.WriteLine("seven");
  38.         }
  39.         else if (a == '8')
  40.         {
  41.             Console.WriteLine("eight");
  42.         }
  43.         else if (a == '9')
  44.         {
  45.             Console.WriteLine("nine");
  46.         }
  47.         else if (a == '0')
  48.         {
  49.             Console.WriteLine("zero");
  50.         }
  51.     }
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement