#include #include #include /* compute the average of the values in the table */ double mean( double *table, // location of the table int count) // number of values { } /* compute the variance of the values in the table */ double var( double *table, // location of the table int count, // number of values double mean) // mean value { } /* renormalize a table of values so that it has the */ /* target mean and target variance */ void normalize( double *table, // location of the table int count, // number of values double mean, // existing mean value double var, // existing variance double tmean, // target mean double tvar) // target variance { } int main( int argc, char **argv) { double targmean; double targvar; double truemean; double truevar; double table[100]; int count = 0; /* Acquire targmean and targvar from the command line */ ---- add your code here ----- fprintf(stdout, "Target mean and variance: %8.2f %8.2f \n", targmean, targvar); /* Read doubleing point values into table from the standard */ /* input... Remember the total number of values in count */ ---- add your code here ------- truemean = mean(table, count); truevar = var(table, count, truemean); fprintf(stdout, "Before: True mean and variance: %8.2f %8.2f \n", truemean, truevar); normalize(table, count, truemean, truevar, targmean, targvar); truemean = mean(table, count); truevar = var(table, count, truemean); fprintf(stdout, "After: True mean and variance: %8.2f %8.2f \n", truemean, truevar); }