C++

Closed
rashid - Oct 28, 2009 at 06:58 AM
 Blocked Profile - Oct 28, 2009 at 07:06 AM
Hello,
what will be the code of four numbers taken from user and to determine which is even and odd?

1 response

Blocked Profile
Oct 28, 2009 at 07:06 AM
Dear Rashid,

You will have to use a loop model. hence assign a = 1. You will have to configure a range for it which

will be, a+2, a+4, a+6 and etc. If the numbers input is in this ranged, it should be an odd number. Create

another range for the even numbers assigning b as 2. This should the problem that you are actually

facing.

Thanks in advance.
0