So a is always > 0 and a - 0 doesn't change a
Glad you got it.
Type: Posts; User: Norm
So a is always > 0 and a - 0 doesn't change a
Glad you got it.
Does that mean your program now works?
If not, why aren't you testing the program to see what is printed out?
What prints out when the program is executed?
If there is an infinite loop,
either the printouts will go forever and what is printed will show you where the loop is
or the prints will stop and...
What did the debug println()s print out? Where did you put them in the code? Were any inside the loop?
Does that mean you have solved the problem?
Is that where the while() loop is I asked about earlier?
Continue debugging by adding println() statements to the code in the ggT() method to see what is happening there.
Time to do some debugging. I use println()s. Add lots of println() statements to the code that print out the values of variables as the code executes and shows where the execution flow is going. ...
Did you try this:
Does the while loop end? Add some debug logic inside the loop to keep it from executing too many times.
A suggestion: For testing use smaller sizes like 10 vs 1000.
Does the while loop end? Add some debug logic inside the loop to keep it from executing too many times.