umair10 said:
hi
hmm still little confused. what do u mean by replace operand2 with value that determines odd/even....rest i have understood that i need 1 operand. Can you please write the code? i have thought a lot but no way.
Sorry that sentance didn't make that much sense. You only need one operand, so you can remove the code which extracts or does anything to operand2. Then you need to replace the line which reads
// Process Step
answer = Operand1 / Operand2;
with somthing like:
bool odd = false;
if(Operand1??????)
{
odd = true;
}
Where the ???? bit is your code to check if it's odd or not.
I'm afraid I'm not going to write the code. Programming is about translating what you want to coputer todo into a langauge that enables it to do it, at the moment I'm not sure you know what you want to do at a low enough level.
So the first step is this, if I gave you three numbers 2, 3 and 4, can you tell me which ones are odd and which are even. Then can you tell me the algorithm you use to work this out. Then if you have trouble translating the algorithm, we can help.