Skip to content

Instantly share code, notes, and snippets.

@Pharaoh00
Created September 15, 2019 22:40
Show Gist options
  • Save Pharaoh00/eee02b27d601b0acbc4acb6bea793f53 to your computer and use it in GitHub Desktop.
Save Pharaoh00/eee02b27d601b0acbc4acb6bea793f53 to your computer and use it in GitHub Desktop.
int mdcEx23(int num1, int num2){
int* temp = malloc(sizeof(int));
while(num2 != 0){
temp = num1 % num2;
num1 = num2;
num2 = temp;
}
return num1;
free(temp);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment