Advertisement
YavorGrancharov

Digits_with_Words

Jun 10th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.34 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 Digits_with_Words
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             string input = Console.ReadLine();
  14.  
  15.             switch (input)
  16.             {
  17.                 case "zero":
  18.                     Console.WriteLine(0);
  19.                     break;
  20.                 case "one":
  21.                     Console.WriteLine(1);
  22.                     break;
  23.                 case "two":
  24.                     Console.WriteLine(2);
  25.                     break;
  26.                 case "three":
  27.                     Console.WriteLine(3);
  28.                     break;
  29.                 case "four":
  30.                     Console.WriteLine(4);
  31.                     break;
  32.                 case "five":
  33.                     Console.WriteLine(5);
  34.                     break;
  35.                 case "six":
  36.                     Console.WriteLine(6);
  37.                     break;
  38.                 case "seven":
  39.                     Console.WriteLine(7);
  40.                     break;
  41.                 case "eight":
  42.                     Console.WriteLine(8);
  43.                     break;
  44.                 case "nine":
  45.                     Console.WriteLine(9);
  46.                     break;
  47.             }
  48.         }
  49.     }
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement