oooooohhhhhhh, thats where the problem is then. I thought that || meant and. um....what does it mean?
Edit: just updated the code, 25 and 30 now produce a result of 5! Woo! Thanks for your...
Type: Posts; User: mattig89ch
oooooohhhhhhh, thats where the problem is then. I thought that || meant and. um....what does it mean?
Edit: just updated the code, 25 and 30 now produce a result of 5! Woo! Thanks for your...
At this point, I'm getting decimals in my returns. no idea why. For example, if you divide 25 by 10 the result is 2.5. But when its saying that 25 % 10 = 0, so its storing 10 in GCD.
At the...
ok, I'm with you so far. I think.
its supposed to stop when the counter reaches the smallest number. And only assign anything to the GDC variable if the firstResult and secResult are both 0.
...
I did acutally, but I'll post it again.
int firstInput = Integer.parseInt(JOptionPane.showInputDialog("Enter First number"));
int secInput =...
Ok, I still haven't been able to find where my problem is. Does anyone know where my logic is going bad?
Right-o. I'm running the math through a do-while loop that terminates when the counter reaches the size of the smallest variable.
The counter both controls the loop and provides something to get...
Thanks for that link. I think I may have a way to do it w/out using arrays. Would someone mind checking my logic to see how right or wrong I am?
First the user inputs 2 numbers.
Next I check...
Hidy ho all,
I just got an assignment where I have to find the Greatest Common denominator of 2 numbers that a user inputs.
My first idea on how to do this is to loop through both numbers to...