Question: I have written a c code to solve this problem analytically: #include double calc_prob(int people) { int n=365,i=0; double sum=1; for(i=0;i { sum=sum*n/365; n=n-1; }

I have written a c code to solve this problem analytically:
#include
double calc_prob(int people)
{
int n=365,i=0;
double sum=1;
for(i=0;i { sum=sum*n/365; n=n-1; } return 1-sum; } int main() { int people; printf(" Enter how many people are there:"); scanf("%d",&people); printf(" So Probability that atleast 2 people have same birthday out of %d peo$ return 1; } Below is the output for the above, when N=2,3,4 (done analytically) Now help me with the c code to Generalize this for N persons and compare the result with the Monte Carlo method. sample: 
#include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
