Skip to content

Instantly share code, notes, and snippets.

@raphaelrk
Last active October 2, 2015 15:19
Show Gist options
  • Save raphaelrk/7a7d798907a53af441d3 to your computer and use it in GitHub Desktop.
Save raphaelrk/7a7d798907a53af441d3 to your computer and use it in GitHub Desktop.
// 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