You are on page 1of 1

int x,y,r;

r = x%y;
while (r != 0) {
x = y;
y = r;
r = x%y;
}
System.out.println(y);

You might also like