Can someone tell me why my compiler won't compile this code and how to fix it?
void gcd(int x, int y)
{
if (x > y)
{
int c;
while(1)
{
c = x % y;
return y;
x = y;
y = c;
}
if (y > x)
{
int d;
while(1)
{
d = x % y;
return x;
y = x;
x = d;
}
}
}