0
How to find even or odd no using function
I want to know how to find whether the no is even or odd using void test() function
1 ответ
0
you can use the modulo operand, e.g
void evenOrOdd (int num)
{
if (num % 2 == 0)
{
court << "even";
}
else
{
court << " odd";
}
}