]> thyrsus.com Git - deal.git/commitdiff
Change order of arguments. Fix header line.
authorEric S. Raymond <esr@thyrsus.com>
Thu, 13 Apr 1995 05:17:37 +0000 (05:17 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 13 Apr 1995 05:17:37 +0000 (05:17 +0000)
deal.c

diff --git a/deal.c b/deal.c
index 1cad229348c46abba0741ea783672938824d0ad7..25e3e065204a2d162d2cdd302d55b359a7daf932 100644 (file)
--- 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 # | ");