#include <stdio.h>
// Function prototype
unsigned int gcd(unsigned int x, unsigned int y);
int main() {
unsigned int gcDiv; // Greatest common divisor of x and y
printf("Enter two integers: ");
unsigned int x; // First integer
unsigned int y; // Second integer
scanf("%u%u", &x, &y);
gcDiv = gcd(x, y);
printf("Greatest common divisor of %u and %u is %u
", x, y, gcDiv);
}
unsigned int gcd(unsigned int x, unsigned int y) {
if (y == 0) {
return x;
} else {
return gcd(y, x % y);
}
}