Advertisement
Guest User

Untitled

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