Advertisement
grigorb57

Odd Even

Jan 22nd, 2018
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.59 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. using System.Globalization;
  7.  
  8.  
  9. namespace ConsoleApp8
  10. {
  11.     class Program
  12.     {
  13.         static void Main(string[] args)
  14.         {
  15.             int num;
  16.  
  17.             string result = Console.ReadLine();
  18.  
  19.             int.TryParse(result, out num);
  20.  
  21.  
  22.             if (num % 2 == 0)
  23.                 Console.WriteLine("even");
  24.            
  25.            else
  26.                 Console.WriteLine("odd");
  27.            
  28.            
  29.          
  30.            
  31.  
  32.         }
  33.     }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement