[Solved] How to print odd/even next to the multiples of a table asked by user in a C program [duplicate]


Modify your printf() statement to:

printf ( "%d * %d = %d : %s\n", n, i, n*i, (n*i % 2 == 0) ? "EVEN" : "ODD" );

The modulus operator gives the remainder of n divided by 2.

3

solved How to print odd/even next to the multiples of a table asked by user in a C program [duplicate]