Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace EvenOrOdd
- {
- class EvenOrOdd
- {
- static void Main()
- {
- int num = int.Parse(Console.ReadLine());
- CheckIFNumberISEven(num);
- }
- public static int CheckIFNumberISEven(int num)
- {
- if(num % 2 == 0)
- {
- Console.WriteLine($"Number {num} is even");
- }
- else
- {
- Console.WriteLine($"Number {num} is odd");
- }
- return num;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment