Skip to content

Instantly share code, notes, and snippets.

@Extensa
Created August 4, 2014 11:43
Show Gist options
  • Save Extensa/1b51236abcbc50c11a2a to your computer and use it in GitHub Desktop.
Save Extensa/1b51236abcbc50c11a2a to your computer and use it in GitHub Desktop.
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