Advertisement
NikolaySpasovTriset

0to9inText

Sep 7th, 2016
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.07 KB | None | 0 0
  1. using System;
  2.  
  3. class num0to9inText
  4. {
  5.     static void Main()
  6.     {
  7.         var a = double.Parse(Console.ReadLine());
  8.         if (a == 0)
  9.         {
  10.             Console.WriteLine("Zero");
  11.         }
  12.         else if (a == 1)
  13.         {
  14.             Console.WriteLine("One");
  15.         }
  16.         else if (a == 2)
  17.         {
  18.             Console.WriteLine("Two");
  19.         }
  20.         else if (a == 3)
  21.         {
  22.             Console.WriteLine("Three");
  23.         }
  24.         else if (a == 4)
  25.         {
  26.             Console.WriteLine("Four");
  27.         }
  28.         else if (a == 5)
  29.         {
  30.             Console.WriteLine("Five");
  31.         }
  32.         else if (a == 6)
  33.         {
  34.             Console.WriteLine("Six");
  35.         }
  36.         else if (a == 7)
  37.         {
  38.             Console.WriteLine("Seven");
  39.         }
  40.         else if (a == 8)
  41.         {
  42.             Console.WriteLine("Eight");
  43.         }
  44.         else if (a == 9)
  45.         {
  46.             Console.WriteLine("Nine");
  47.         }
  48.         else
  49.         {
  50.             Console.WriteLine("The number is too big!");
  51.         }
  52.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement