SOURCE FILE: birthday.cpp


#include <math.h>
#include <iostream>
#include <iomanip>

using namespace std ;

int main  ()
{
   int people ;
   double odds ;
  
   odds = 1.0 ;
   cout << "people    odds" << endl << endl ;

   cout.setf(ios::fixed) ;
   cout.setf(ios::right) ;

   for (people=1; people <= 365; people++)
   {
       odds = odds * (365-people+1)/365 ;
    
       cout << " " 
       << setprecision(0) << setw(4) << people << "    " 
       << setprecision(4)<< setw(9) << 100*odds << endl ;
   }

}