Advertisement
ivanovki

05.NumberToText

Feb 22nd, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.17 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 _05.NumberToText
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int num = int.Parse(Console.ReadLine());
  14.  
  15.             if (num == 0)
  16.             { Console.WriteLine("zero"); }
  17.  
  18.             else if (num == 1)
  19.  
  20.             { Console.WriteLine("one"); }
  21.  
  22.             else if (num == 2)
  23.  
  24.             { Console.WriteLine("two"); }
  25.  
  26.             else if (num == 3)
  27.  
  28.             { Console.WriteLine("three"); }
  29.  
  30.             else if (num == 4)
  31.  
  32.             { Console.WriteLine("four"); }
  33.  
  34.             else if (num == 5)
  35.  
  36.             { Console.WriteLine("five"); }
  37.  
  38.             else if (num == 6)
  39.  
  40.             { Console.WriteLine("six"); }
  41.  
  42.             else if (num == 7)
  43.  
  44.             { Console.WriteLine("seven"); }
  45.  
  46.             else if (num == 8)
  47.  
  48.             { Console.WriteLine("eight"); }
  49.  
  50.             else if (num == 9)
  51.  
  52.             { Console.WriteLine("nine"); }
  53.  
  54.             else
  55.  
  56.             { Console.WriteLine("number too big"); }
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.         }
  68.     }
  69. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement