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

Extended Euclidean Algorithm in PHP #2988

Merged
merged 3 commits into from
May 29, 2020
Merged

Extended Euclidean Algorithm in PHP #2988

merged 3 commits into from
May 29, 2020

Conversation

utkarshanehe
Copy link
Contributor

@utkarshanehe utkarshanehe commented May 25, 2020

Fixes #2906

Checklist:

  • 4 space indentation.
  • Coding conventions are followed.
  • Input is taken dynamically.
  • Sample Input / Output is added at the end of file.
  • Logic Documentation (Comments).
  • File names are correct.

Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!

Changes proposed in this pull request:

  • Program for Extended Euclidean Algorithm in PHP

Languages Used:

  • PHP

Files Added:

  • Extended_Euclidean_Algorithm.php

We're happy to help you get this ready -- don't be afraid to ask for help.

Thanks!

@shivamgupta57121
Copy link
Contributor

You have to complete the checklist before making pull request.

}

// Driver Code
$x = 0;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

take input dynamically

echo "\nGCD of ", $a, " and ", $b, " is ", gcd($a, $b, $x, $y);

/*
Input:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These lines should be left indent

$y = 0;
$a = 20;
$b = 5;
echo "\nGCD of ", $a, " and ", $b, " is ", gcd($a, $b, $x, $y);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also print x and y

@@ -0,0 +1,35 @@
<?php
//Function to find GCD
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a empty line after <?php

@utkarshanehe
Copy link
Contributor Author

@raghav-dalmia @jainaman224 @asha15
I have implemented all the suggested changes. Please review my PR.

@asha15 asha15 dismissed raghav-dalmia’s stale review May 29, 2020 05:04

completed the requested changes

@asha15 asha15 merged commit a87620b into jainaman224:master May 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extended Euclidean Algorithm
4 participants