Advertisement
danielaavramova

using System; using System.Collections.Generic; using System

Sep 26th, 2016
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.60 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 English_Name_of_Last_Digit
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int num = int.Parse(Console.ReadLine());
  14.             int lastDigit = num % 10;
  15.  
  16.             string[] numbers = { "zero", "one", "two", "tree", "four",
  17.                 "five", "six", "seven", "eight", "nine"};
  18.             if(num >= 0 || num <= 9)
  19.             {
  20.                 Console.WriteLine(numbers[lastDigit]);
  21.             }
  22.         }
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement