Al Programming
Free source code programming in C#, VB.Net, Java, SQL
Search This Blog
Tuesday, May 13, 2014
Check number is even or odd C#
C#
>
Operators
>
% Operator
Computes the remainder after dividing its first operand by its second.
Example: Check number is even or odd
for
(
int
x = 0; x < 100; x++)
{
if
(x % 2 == 0)
//even number
else
//odd number
}
Newer Post
Older Post
Home