After thinking about it for a while, I came up with this...
if (num1 == 0)
num1++;
if (num2 == 0)
num2++;
Type: Posts; User: Java Neil
After thinking about it for a while, I came up with this...
if (num1 == 0)
num1++;
if (num2 == 0)
num2++;
I'll give it a try and report back...Thanks for the heads up. In this case the division and the modulo statements? Right?
Sorry about my ignorance, but how would I apply this method? Where would I place the code to catch the error?
OK, so I've got a working program now. All I need to figure out is what to do when the random numbers generate a (zero/0) during division and modulo problems. I keep getting errors when that happens....
Thanks for the tips everyone. I have a working code kinda. There are still some logical bugs to fix. At the end of the program I am supposed to give the user a chance to either start over or quit....
The code will not compile. It says..." reached end of file while parsing"
By the way, thanks a lot for helping me out. My teacher speaks broken English, and most of the time I can't understand him!
Hello fellow programers...I hope someone can help me. I'm new to java and I have an assignment for extra credit that I could really use. This is my first programing course and this problem has me a...