Created
October 27, 2015 20:39
-
-
Save trys/0def32cb6677baeea31f to your computer and use it in GitHub Desktop.
Problem Fifteen
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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