| Author |
Truth table for Loops
|
Win jones
Ranch Hand
Joined: Dec 12, 2004
Posts: 38
|
|
Hey guys can someone help me out with a truth table that has worked out for them. I am having serious trouble solving questions that involve loops with a number of variables and conditions, I usually end up wasting a lot of time and getting a result that is not part of the choice . I tried the truth table i.e one for each variable defined and after that I get confused half way thru. Any help would greatly increase my scores. I do understand that it might sound like a trivial request but I am losing lots of points here. Please share any methods that has worked for you. Thanks
|
 |
Jay Pawar
Ranch Hand
Joined: Aug 27, 2004
Posts: 411
|
|
Jones, Can you post one complex loop as an example ? I will give a try to come up with truth table.
|
Cheers,<br />Jay<br /> <br />(SCJP 1.4)<br />Heights of great men were not achieved in one day, they were toiling day and night while their companions slept.
|
 |
Win jones
Ranch Hand
Joined: Dec 12, 2004
Posts: 38
|
|
Hi Jay, How about this piece Thanks
|
 |
Anusorn Swasdee
Greenhorn
Joined: Nov 04, 2004
Posts: 13
|
|
Sorry for interrupting. <hope both of you not angry> But when I find something like this. I just write table of progressing values in a piece of paper. And go through the program while keep writing changed value. I'm not writing the truth table because the truth table only decide which code to do or not to do or which way to go < I use my finger to indecate where I am now in which parts of code.> <the testing center provides paper and pen, if not, use notepad> [ January 06, 2005: Message edited by: Anusorn Swasdee ]
|
 |
Win jones
Ranch Hand
Joined: Dec 12, 2004
Posts: 38
|
|
thanks Anusorn, Thats how I do it too , how about the conditions - u just remeber at each step and also the pre n post increment decrement if any - is there any way to capture all that .... Thanks for prev post
|
 |
Anusorn Swasdee
Greenhorn
Joined: Nov 04, 2004
Posts: 13
|
|
Er... How about rewriting the code to make it easier and less complex. and make some syntax error on purpose like this Hope this will help Anusorn
|
 |
 |
|
|
subject: Truth table for Loops
|
|
|