Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# odd or even

namespace ConsoleApp1
{
    internal class Program
    {
        static void Main(string[] args)
		{
			int x = 6;
            if (x % 2 == 0)
            {
                Console.WriteLine("x is even");

            } else if   (x % 2 == 1)
            {
                Console.WriteLine("x is odd");
            }
		}
    }
}
Source by csharp-station.com #
 
PREVIOUS NEXT
Tagged: #odd
ADD COMMENT
Topic
Name
2+6 =