Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace ConsoleApp1
- {
- class Program
- {
- static void Main(string[] args)
- {
- int ecks;
- Console.WriteLine("Gib Number! ");
- ecks = Console.Read();
- OddChecker.NumChecker(ecks);
- }
- }
- class OddChecker
- {
- public static void NumChecker(int x)
- {
- if (x == 0){ Console.WriteLine("Zero!"); }
- if (x != 0 && x % 2 == 0) { Console.WriteLine("Even!"); }
- if (x != 0 && x % 2 !=0) { Console.WriteLine("Odd!"); }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement