Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed gcd #102

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Fixed gcd #102

wants to merge 2 commits into from

Conversation

lrtraviteja
Copy link

Your checklist for this pull request

  • I have committed only those files that are required.
  • I have tried commit messages concise and reflective of the code committed.
  • I have used a branch name reflective of the issue.
  • If there is relavant issue for the PR, I have used closes #<issue number> to auto-close the issue once PR is merged.

Detailed description

There happens to perform an incorrect logic for GCD of two numbers

Test plan (required)

Example 1:
12, 23 their GCD is 1
Example 2:
10, 2 their GCD is 2
Example 3:
10, 0 their GCD is 0
The output of the code is tested against the above examples and verified to be working as expected.

Closing issues

closes #2

Multiplication is being processed instead of addition
Instead of getting the GCD we are getting sum of given two numbers hence used the GCD function to solve the issue.
@lrtraviteja lrtraviteja reopened this Feb 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Greatest Common Divisor Not working
1 participant