67.1k views
6 votes
Which code segment results in "true" being returned if a number is odd? Replace "MISSING CONDITION" with the correct code segment.

a) num % 2 == 0;
b) num % 2 ==1;
c) num % 1 == 0;
d) num % 0 == 2;

Which code segment results in "true" being returned if a number is odd? Replace-example-1
User Janetsmith
by
5.4k points

1 Answer

0 votes

Answer:

Which code segment results in "true" being returned if a number is odd? Replace "MISSING CONDITION" with the correct code segment.

Step-by-step explanation:

num % 2 ==1;

User Eol
by
6.2k points