Data Types And Methods - English Name оf The Last Digit
Здравейте,
Имам проблем с последния тест на задачата и не мога да разбера къде ми е грешката :)
using System;
namespace English_Name_Of_The_Last_Digit
{
class Program
{
static void Main(string[] args)
{
long num = long.Parse(Console.ReadLine());
GetLastDigit(num);
}
private static void GetLastDigit(long num)
{
var LastDigit = num % 10;
switch (LastDigit)
{
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(); break;
}
}
}
}