Last active
October 2, 2015 15:19
-
-
Save raphaelrk/7a7d798907a53af441d3 to your computer and use it in GitHub Desktop.
This file contains 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
// by Raphael Rouvinov | |
// for stat 110 pset 3 | |
#include <stdio.h> | |
int main(void) | |
{ | |
double sum = 0; | |
for(int j = 1; j <= 48; j++) | |
{ | |
double num = 3.0 / (52 - j); | |
num *= 4.0 / (53 - j); | |
for(int i = 1; i <= j-1; i++) | |
{ | |
num *= (49.0-i)/(53.0-i); | |
} | |
sum += num; | |
} | |
printf("sum: %f\n", sum); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment