Created
August 4, 2014 11:43
-
-
Save Extensa/1b51236abcbc50c11a2a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
class DigitAsWord | |
{ | |
static void Main() | |
{ | |
string n = Console.ReadLine(); | |
switch (n) | |
{ | |
case "0": Console.WriteLine("zero"); break; | |
case "1": Console.WriteLine("one"); break; | |
case "2": Console.WriteLine("two"); break; | |
case "3": Console.WriteLine("three"); break; | |
case "4": Console.WriteLine("four"); break; | |
case "5": Console.WriteLine("five"); break; | |
case "6": Console.WriteLine("six"); break; | |
case "7": Console.WriteLine("seven"); break; | |
case "8": Console.WriteLine("eight"); break; | |
case "9": Console.WriteLine("nine"); break; | |
default: Console.WriteLine("not a digit"); break; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment