#include int main(int argc, char *argv[]) { double sum_w1, sum_w2; int i, num_samples; num_samples = atoi(argv[1]); /* Seed the random-number generator with current time so that * the numbers will be different every time we run. */ srand( (unsigned)time( NULL ) ); /* Likelihood weighting part. */ sum_w1 = sum_w2 = 0; for (i=0; ip)?0:1; }