Int lion(int x) // x is positive int { while (x!=10 && x%2==0) x+=2; return x; } int tiger (int x) { do { x+=2;} while (x!=10 && x%2==0); return x; } for which values of x is it true that lion(x) equals tiger(x)

For all even integers less than 10

This question is related to Wipro Interview

Showing Answers 1 - 1 of 1 Answers

jayanth , rajesh

  • Mar 19th, 2006
 

ans 2,4,6 only

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions