00001 /************************** 00002 * flipCoins is a program which 00003 * simulates the flipping of a coin 00004 * a number of times. 00005 * 00006 * Written by Paul Eugenio 00007 * Florida State University 00008 * 17 Feb 2011 00009 * modified 15 Mar 2011 00010 ***************************/ 00011 00012 #include <iostream> 00013 #include <cstdlib> 00014 00015 using namespace std; 00016 00017 #include <coin.h> 00018 00019 00020 int main(int argc, char* argv[]){ 00021 00022 coin C1; 00023 00024 00025 if( argc > 1) 00026 C1.flip( atoi(argv[1]) ); 00027 00028 else // print program usage 00029 cerr << "Usage: " << argv[0] << " <n>" << endl 00030 << "\t\t where <n> is the number of coins flips" << endl; 00031 00032 } 00033