Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ConsoleApp7
- {
- class Program
- {
- static string OddEven(int a)
- {
- string s = "";
- switch (a)
- {
- case 0: case 2: case 4: case 6: case 8:
- s = "even";
- break;
- case 1: case 3: case 5: case 7: case 9:
- s = "odd";
- break;
- }
- return s;
- }
- static string Last(int a)
- {
- string s = "";
- switch (a)
- {
- case 0:
- s = "zero";
- break;
- case 1:
- s = "one";
- break;
- case 2:
- s = "two";
- break;
- case 3:
- s = "three";
- break;
- case 4:
- s = "four";
- break;
- case 5:
- s = "five";
- break;
- case 6:
- s = "six";
- break;
- case 7:
- s = "seven";
- break;
- case 8:
- s = "eight";
- break;
- case 9:
- s = "nine";
- break;
- }
- return s;
- }
- static void Main(string[] args)
- {
- int a = int.Parse(Console.ReadLine());
- a = a % 10;
- Console.WriteLine(Last(a));
- Console.WriteLine(OddEven(a));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement