Skip to content

Instantly share code, notes, and snippets.

@alexchirea
Created October 15, 2019 10:26
Show Gist options
  • Save alexchirea/ddd246d76201af7966d955171806d475 to your computer and use it in GitHub Desktop.
Save alexchirea/ddd246d76201af7966d955171806d475 to your computer and use it in GitHub Desktop.
// CMMDC scris in C
#include<stdlib.h>
#include<stdio.h>
int main() {
int a, b, r;
scanf("%d", &a);
scanf("%d", &b);
printf("%d %d", a, b);
r = a % b;
while (r) {
a = b;
b = r;
r = a % b;
}
printf("CMMDC = %d\n", b);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment