Created
March 7, 2020 13:17
-
-
Save Nick3523/e3addcd59de93c14fc11c924f9d7f33a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int pgcd(int a, int b) { | |
while(b != 0) { | |
int tmp = b; | |
b = a % b; | |
a = tmp; | |
} | |
return a; | |
} | |
int main() { | |
int a = 50; | |
int b = 62; | |
int res = pgcd(a,b); | |
printf("Le pgcd de %i et %i est %i ",a, b, res); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment