Skip to content

Instantly share code, notes, and snippets.

@trys
Created October 27, 2015 20:39
Show Gist options
  • Save trys/0def32cb6677baeea31f to your computer and use it in GitHub Desktop.
Save trys/0def32cb6677baeea31f to your computer and use it in GitHub Desktop.
Problem Fifteen
var result = 0,
i,
j;
for ( i = 1; i <= 20; i++ ) {
result = 1;
for ( j = (2*i) - i + 1; j <= (2*i); j++) {
result *= j;
}
for ( j = 1; j <= i; j++) {
result /= j;
}
}
document.write( result );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment