Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace EvenOrOdd
- {
- class EvenOrOdd
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Enter a random whole number: ");
- int number = int.Parse(Console.ReadLine());
- if (number % 2 == 0)
- {
- Console.WriteLine("The number is even.");
- }
- else
- {
- Console.WriteLine("The number is odd.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement