if (argc == 1) {
printf("Help for Cardprobs : here's the order of the arguments:\n");
- printf(" # of turns; # special cards; # total cards;\n");
+ printf(" # special cards; # total cards; # of turns; \n");
printf(" # columns.\n");
printf("No arguments are optional.\n");
} else {
- turns = atoi(argv[1]);
- special = atoi(argv[2]);
- total = atoi(argv[3]);
+ special = atoi(argv[1]);
+ total = atoi(argv[2]);
+ turns = atoi(argv[3]);
if (total < special) {
printf("can't have more specials than total cards!\n");
exit(-1);
columns = special+1;
}
- printf("%d total cards; %d special cards\n\n\n",total,special);
+ printf("%d special cards out of %d total; %d turns, %d columns\n",special,total,turns,columns);
printf(" | Prob of this number of specials\n");
printf("Turn # | ");