| Author |
Divide by zero???
|
Mark Henryson
Ranch Hand
Joined: Jul 11, 2005
Posts: 200
|
|
In the below, Why divide by zero error is not raising? It is compiling and running without any exception. How?
|
 |
Hentay Duke
Ranch Hand
Joined: Oct 27, 2004
Posts: 198
|
|
You're incementing the value of i before it is used in the division, so divide by 0 is never happening. Put a sysout to see tha value of i just after your sysout for the value of k and you'll see.
|
 |
Stan James
(instanceof Sidekick)
Ranch Hand
Joined: Jan 29, 2003
Posts: 8791
|
|
|
Did you ever divide by 0? Display i inside your loop and think about the first time through.
|
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
|
 |
 |
|
|
subject: Divide by zero???
|
|
|