Skip to content

Instantly share code, notes, and snippets.

@jwpeterson
Created June 20, 2016 16:58
Show Gist options
  • Select an option

  • Save jwpeterson/deb165a27e2a12d996da85f0c6727ebb to your computer and use it in GitHub Desktop.

Select an option

Save jwpeterson/deb165a27e2a12d996da85f0c6727ebb to your computer and use it in GitHub Desktop.
int mystery(int n)
{
int i = 1;
switch (n)
{
case 8: i*=2; case 7: i*=2;
case 6: i*=2; case 5: i*=2;
case 4: i*=2; case 3: i*=2;
case 2: i*=2; case 1: i*=2;
}
return i;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment