public int UndocumentedCode(int a, int b)
{
while (true)
{
a -= b;
b += a;
a = b - a;
if (b < a)
{
return b;
}
else
{
b += 1;
}
}
}
First figure out what it does (or look at the spoiler) the challenge is to make it as long as possible without adding lines that do absolutely nothing e.g. if (true) or do anything completely meaningless e.g. a declaration that isn't used/needed.
any lines of code that can be removed, with the result still being the same, do not count
the more confusing looking, the better.
it is a function for getting the lesser of two numbers. the if (b < a) return b is self explanatory. The a and b calculations at the top are to swap b and a around, so when it loops it will check a < b. the b+=1 is to prevent infinite loops if they are the same