Friday, 8 February 2013

9

What is the following function doing?

int foo(int a, int b)
{
int c = a, d = b;
while(a != b)
{
if(a < b)
a = a+c;
else
b = b+d;
}
return a;
}
Join me on Facebook