GCD.java placed in Others package doesn't work right
Greatest divisor common algorithm coded in GDC.java doesn't work when the numbers into the array are arranged in ascending order. I mean, the function gcd(int num1, int num2) works right if the call is gdc(40,24) but doesn't work if the call is gdc(24,40).
@MarisaAfuera Thanks for bug report. I jump right in.
@MarisaAfuera It works for none of this cases: (24,40) or (40,24) I get various outputs but none of it is correct. The correct answer is 8.
@MarisaAfuera
he function gcd(int num1, int num2) works right
No. In this method is the bug. See my comments above.
@MarisaAfuera I fixed it.
Hi Christian,
I'm novice in github. I'm looking for contribute making some code. It doen't matter new code or fixing old one. If I can help you in any way, I'm willing.
Sincerely
Marisa Afuera
2018-07-25 17:08 GMT+02:00 Christian Bender [email protected]:
Closed #471 https://github.com/TheAlgorithms/Java/issues/471.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/TheAlgorithms/Java/issues/471#event-1752858112, or mute the thread https://github.com/notifications/unsubscribe-auth/ASac7M313xkAzvv0fjIyZLral_2wE43Eks5uKIoCgaJpZM4VgOu9 .
@MarisaAfuera Oh. Sorry. You can fix code style issues in the code of the implemented algorithms and data structures. Many files in this repository have an bad style. Orient you on the Java code sytle conventions Feel free and make a pull request. One pull request per file.
Ok. I'll work in order to improve the code.
Marisa
El mié., 25 jul. 2018 23:28, Christian Bender [email protected] escribió:
@MarisaAfuera https://github.com/MarisaAfuera Oh. Sorry. You can fix code style issues in the code of the implemented algorithms and data structures. Many files in this repository have an bad style. Orient you on the Java code sytle conventions https://www.oracle.com/technetwork/java/javase/overview/codeconvtoc-136057.html Feel free and make a pull request. One pull request per file.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/TheAlgorithms/Java/issues/471#issuecomment-407901752, or mute the thread https://github.com/notifications/unsubscribe-auth/ASac7ModbdKedZ77ThM5AQLkB3euHNV6ks5uKOL-gaJpZM4VgOu9 .