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 EvenOrOddV2
- {
- static void Main()
- {
- int num = int.Parse(Console.ReadLine());
- if(CheckNumberIsEven(num))
- {
- Console.WriteLine("number is even");
- }
- else
- {
- Console.WriteLine("number is odd");
- }
- }
- public static bool CheckNumberIsEven(int num)
- {
- if(num%2==0)
- {
- return true;
- }
- else
- {
- return false;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment