grach

Number09toText

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