From: Eric S. Raymond Date: Thu, 13 Apr 1995 05:17:37 +0000 (+0000) Subject: Change order of arguments. Fix header line. X-Git-Tag: 2.0~26 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=ffd9b6473056e684ec7764a9a805ae7423ca0041;p=deal.git Change order of arguments. Fix header line. --- diff --git a/deal.c b/deal.c index 1cad229..25e3e06 100644 --- a/deal.c +++ b/deal.c @@ -9,13 +9,13 @@ main(argc, argv) 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); @@ -27,7 +27,7 @@ main(argc, argv) 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 # | ");