Example program showing output of a table of values of cdf and pdf
for various k failures.

// Print a table of values that can be used to plot// using Excel, or some other superior graphical display tool.cout.precision(17);// Use max_digits10 precision, the maximum available for a reference table.cout<<showpoint<<endl;// include trailing zeros.// This is a maximum possible precision for the type (here double) to suit a reference table.intmaxk=static_cast<int>(2.*mynbdist.successes()/mynbdist.success_fraction());// This maxk shows most of the range of interest, probability about 0.0001 to 0.999.cout<<"\n"" k pdf cdf""\n"<<endl;for(intk=0;k<maxk;k++){cout<<right<<setprecision(17)<<showpoint<<right<<setw(3)<<k<<", "<<left<<setw(25)<<pdf(mynbdist,static_cast<double>(k))<<left<<setw(25)<<cdf(mynbdist,static_cast<double>(k))<<endl;}cout<<endl;