linuxserver1[101] a.out

Your greeting and explanation of the program
to the user go here.


	I - view sequence for an Individual value
	R - view sequences for a Range of values
	H - view the sequences and a Histogram of a range
	W - Write sequences and a histogram of a range to a file
	Q - Quit

Enter choice : i
Please enter an integer between 1 and 9999 : 100

  100 :    100      50      25      76      38      19      58      29      88 
            44      22      11      34      17      52      26      13      40 
            20      10       5      16       8       4       2       1 
length of sequence = 26

	I - view sequence for an Individual value
	R - view sequences for a Range of values
	H - view the sequences and a Histogram of a range
	W - Write sequences and a histogram of a range to a file
	Q - Quit

Enter choice : I
Please enter an integer between 1 and 9999 : 5

    5 :      5      16       8       4       2       1 
length of sequence = 6

	I - view sequence for an Individual value
	R - view sequences for a Range of values
	H - view the sequences and a Histogram of a range
	W - Write sequences and a histogram of a range to a file
	Q - Quit

Enter choice : r
First number in the range :
Please enter an integer between 1 and 9998 : 10
Last number in the range :
Please enter an integer between 11 and 22 : 20

   10 :     10       5      16       8       4       2       1 
length of sequence = 7

   11 :     11      34      17      52      26      13      40      20      10 
             5      16       8       4       2       1 
length of sequence = 15

   12 :     12       6       3      10       5      16       8       4       2 
             1 
length of sequence = 10

   13 :     13      40      20      10       5      16       8       4       2 
             1 
length of sequence = 10

   14 :     14       7      22      11      34      17      52      26      13 
            40      20      10       5      16       8       4       2       1 
       
length of sequence = 18

   15 :     15      46      23      70      35     106      53     160      80 
            40      20      10       5      16       8       4       2       1 
       
length of sequence = 18

   16 :     16       8       4       2       1 
length of sequence = 5

   17 :     17      52      26      13      40      20      10       5      16 
             8       4       2       1 
length of sequence = 13

   18 :     18       9      28      14       7      22      11      34      17 
            52      26      13      40      20      10       5      16       8 
             4       2       1 
length of sequence = 21

   19 :     19      58      29      88      44      22      11      34      17 
            52      26      13      40      20      10       5      16       8 
             4       2       1 
length of sequence = 21

   20 :     20      10       5      16       8       4       2       1 
length of sequence = 8

	I - view sequence for an Individual value
	R - view sequences for a Range of values
	H - view the sequences and a Histogram of a range
	W - Write sequences and a histogram of a range to a file
	Q - Quit

Enter choice : h
First number in the range :
Please enter an integer between 1 and 9998 : 10
Last number in the range :
Please enter an integer between 11 and 22 : 20

   10 :     10       5      16       8       4       2       1 
length of sequence is 7

   11 :     11      34      17      52      26      13      40      20      10 
             5      16       8       4       2       1 
length of sequence is 15

   12 :     12       6       3      10       5      16       8       4       2 
             1 
length of sequence is 10

   13 :     13      40      20      10       5      16       8       4       2 
             1 
length of sequence is 10

   14 :     14       7      22      11      34      17      52      26      13 
            40      20      10       5      16       8       4       2       1 
       
length of sequence is 18

   15 :     15      46      23      70      35     106      53     160      80 
            40      20      10       5      16       8       4       2       1 
       
length of sequence is 18

   16 :     16       8       4       2       1 
length of sequence is 5

   17 :     17      52      26      13      40      20      10       5      16 
             8       4       2       1 
length of sequence is 13

   18 :     18       9      28      14       7      22      11      34      17 
            52      26      13      40      20      10       5      16       8 
             4       2       1 
length of sequence is 21

   19 :     19      58      29      88      44      22      11      34      17 
            52      26      13      40      20      10       5      16       8 
             4       2       1 
length of sequence is 21

   20 :     20      10       5      16       8       4       2       1 
length of sequence is 8

Histogram of Hailstone Sequences from 10 to 20

Scale is 1 to 1
                                                                  
                                                                  
                                                                  
                                                                  
                                                   *     *        
                                                   *     *        
                                                   *     *        
                           *     *                 *     *        
                           *     *                 *     *        
                           *     *                 *     *        
         *                 *     *                 *     *        
         *                 *     *                 *     *        
         *                 *     *           *     *     *        
         *                 *     *           *     *     *        
         *                 *     *           *     *     *        
         *     *     *     *     *           *     *     *        
         *     *     *     *     *           *     *     *        
         *     *     *     *     *           *     *     *     *  
   *     *     *     *     *     *           *     *     *     *  
   *     *     *     *     *     *           *     *     *     *  
   *     *     *     *     *     *     *     *     *     *     *  
   *     *     *     *     *     *     *     *     *     *     *  
   *     *     *     *     *     *     *     *     *     *     *  
   *     *     *     *     *     *     *     *     *     *     *  
   *     *     *     *     *     *     *     *     *     *     *  
   10    11    12    13    14    15    16    17    18    19    20 

	I - view sequence for an Individual value
	R - view sequences for a Range of values
	H - view the sequences and a Histogram of a range
	W - Write sequences and a histogram of a range to a file
	Q - Quit

Enter choice : W
First number in the range :
Please enter an integer between 1 and 9998 : 400
Last number in the range :
Please enter an integer between 401 and 412 : 399
Please enter an integer between 401 and 412 : 411

	I - view sequence for an Individual value
	R - view sequences for a Range of values
	H - view the sequences and a Histogram of a range
	W - Write sequences and a histogram of a range to a file
	Q - Quit

Enter choice : w
First number in the range :
Please enter an integer between 1 and 9998 : 50
Last number in the range :
Please enter an integer between 51 and 62 : 63
Please enter an integer between 51 and 62 : 62

	I - view sequence for an Individual value
	R - view sequences for a Range of values
	H - view the sequences and a Histogram of a range
	W - Write sequences and a histogram of a range to a file
	Q - Quit

Enter choice : q
linuxserver1[102] cat hail50to62.out

   50 :     50      25      76      38      19      58      29      88      44 
            22      11      34      17      52      26      13      40      20 
            10       5      16       8       4       2       1 
length of sequence is 25

   51 :     51     154      77     232     116      58      29      88      44 
            22      11      34      17      52      26      13      40      20 
            10       5      16       8       4       2       1 
length of sequence is 25

   52 :     52      26      13      40      20      10       5      16       8 
             4       2       1 
length of sequence is 12

   53 :     53     160      80      40      20      10       5      16       8 
             4       2       1 
length of sequence is 12

   54 :     54      27      82      41     124      62      31      94      47 
           142      71     214     107     322     161     484     242     121 
           364     182      91     274     137     412     206     103     310 
           155     466     233     700     350     175     526     263     790 
           395    1186     593    1780     890     445    1336     668     334 
           167     502     251     754     377    1132     566     283     850 
           425    1276     638     319     958     479    1438     719    2158 
          1079    3238    1619    4858    2429    7288    3644    1822     911 
          2734    1367    4102    2051    6154    3077    9232    4616    2308 
          1154     577    1732     866     433    1300     650     325     976 
           488     244     122      61     184      92      46      23      70 
            35     106      53     160      80      40      20      10       5 
            16       8       4       2       1 
length of sequence is 113

   55 :     55     166      83     250     125     376     188      94      47 
           142      71     214     107     322     161     484     242     121 
           364     182      91     274     137     412     206     103     310 
           155     466     233     700     350     175     526     263     790 
           395    1186     593    1780     890     445    1336     668     334 
           167     502     251     754     377    1132     566     283     850 
           425    1276     638     319     958     479    1438     719    2158 
          1079    3238    1619    4858    2429    7288    3644    1822     911 
          2734    1367    4102    2051    6154    3077    9232    4616    2308 
          1154     577    1732     866     433    1300     650     325     976 
           488     244     122      61     184      92      46      23      70 
            35     106      53     160      80      40      20      10       5 
            16       8       4       2       1 
length of sequence is 113

   56 :     56      28      14       7      22      11      34      17      52 
            26      13      40      20      10       5      16       8       4 
             2       1 
length of sequence is 20

   57 :     57     172      86      43     130      65     196      98      49 
           148      74      37     112      56      28      14       7      22 
            11      34      17      52      26      13      40      20      10 
             5      16       8       4       2       1 
length of sequence is 33

   58 :     58      29      88      44      22      11      34      17      52 
            26      13      40      20      10       5      16       8       4 
             2       1 
length of sequence is 20

   59 :     59     178      89     268     134      67     202     101     304 
           152      76      38      19      58      29      88      44      22 
            11      34      17      52      26      13      40      20      10 
             5      16       8       4       2       1 
length of sequence is 33

   60 :     60      30      15      46      23      70      35     106      53 
           160      80      40      20      10       5      16       8       4 
             2       1 
length of sequence is 20

   61 :     61     184      92      46      23      70      35     106      53 
           160      80      40      20      10       5      16       8       4 
             2       1 
length of sequence is 20

   62 :     62      31      94      47     142      71     214     107     322 
           161     484     242     121     364     182      91     274     137 
           412     206     103     310     155     466     233     700     350 
           175     526     263     790     395    1186     593    1780     890 
           445    1336     668     334     167     502     251     754     377 
          1132     566     283     850     425    1276     638     319     958 
           479    1438     719    2158    1079    3238    1619    4858    2429 
          7288    3644    1822     911    2734    1367    4102    2051    6154 
          3077    9232    4616    2308    1154     577    1732     866     433 
          1300     650     325     976     488     244     122      61     184 
            92      46      23      70      35     106      53     160      80 
            40      20      10       5      16       8       4       2       1 
       
length of sequence is 108

Histogram of Hailstone Sequences from 50 to 62

Scale is 5 to 1
                                                                              
                                                                              
                                                                              
                           *     *                                            
                           *     *                                         *  
                           *     *                                         *  
                           *     *                                         *  
                           *     *                                         *  
                           *     *                                         *  
                           *     *                                         *  
                           *     *                                         *  
                           *     *                                         *  
                           *     *                                         *  
                           *     *                                         *  
                           *     *                                         *  
                           *     *                                         *  
                           *     *                                         *  
                           *     *                                         *  
                           *     *                                         *  
                           *     *           *           *                 *  
   *     *                 *     *           *           *                 *  
   *     *                 *     *     *     *     *     *     *     *     *  
   *     *                 *     *     *     *     *     *     *     *     *  
   *     *     *     *     *     *     *     *     *     *     *     *     *  
   *     *     *     *     *     *     *     *     *     *     *     *     *  
   50    51    52    53    54    55    56    57    58    59    60    61    62 

linuxserver1[l03] cat hail400to411.out

  400 :    400     200     100      50      25      76      38      19      58 
            29      88      44      22      11      34      17      52      26 
            13      40      20      10       5      16       8       4       2 
             1 
length of sequence is 28

  401 :    401    1204     602     301     904     452     226     113     340 
           170      85     256     128      64      32      16       8       4 
             2       1 
length of sequence is 20

  402 :    402     201     604     302     151     454     227     682     341 
          1024     512     256     128      64      32      16       8       4 
             2       1 
length of sequence is 20

  403 :    403    1210     605    1816     908     454     227     682     341 
          1024     512     256     128      64      32      16       8       4 
             2       1 
length of sequence is 20

  404 :    404     202     101     304     152      76      38      19      58 
            29      88      44      22      11      34      17      52      26 
            13      40      20      10       5      16       8       4       2 
             1 
length of sequence is 28

  405 :    405    1216     608     304     152      76      38      19      58 
            29      88      44      22      11      34      17      52      26 
            13      40      20      10       5      16       8       4       2 
             1 
length of sequence is 28

  406 :    406     203     610     305     916     458     229     688     344 
           172      86      43     130      65     196      98      49     148 
            74      37     112      56      28      14       7      22      11 
            34      17      52      26      13      40      20      10       5 
            16       8       4       2       1 
length of sequence is 41

  407 :    407    1222     611    1834     917    2752    1376     688     344 
           172      86      43     130      65     196      98      49     148 
            74      37     112      56      28      14       7      22      11 
            34      17      52      26      13      40      20      10       5 
            16       8       4       2       1 
length of sequence is 41

  408 :    408     204     102      51     154      77     232     116      58 
            29      88      44      22      11      34      17      52      26 
            13      40      20      10       5      16       8       4       2 
             1 
length of sequence is 28

  409 :    409    1228     614     307     922     461    1384     692     346 
           173     520     260     130      65     196      98      49     148 
            74      37     112      56      28      14       7      22      11 
            34      17      52      26      13      40      20      10       5 
            16       8       4       2       1 
length of sequence is 41

  410 :    410     205     616     308     154      77     232     116      58 
            29      88      44      22      11      34      17      52      26 
            13      40      20      10       5      16       8       4       2 
             1 
length of sequence is 28

  411 :    411    1234     617    1852     926     463    1390     695    2086 
          1043    3130    1565    4696    2348    1174     587    1762     881 
          2644    1322     661    1984     992     496     248     124      62 
            31      94      47     142      71     214     107     322     161 
           484     242     121     364     182      91     274     137     412 
           206     103     310     155     466     233     700     350     175 
           526     263     790     395    1186     593    1780     890     445 
          1336     668     334     167     502     251     754     377    1132 
           566     283     850     425    1276     638     319     958     479 
          1438     719    2158    1079    3238    1619    4858    2429    7288 
          3644    1822     911    2734    1367    4102    2051    6154    3077 
          9232    4616    2308    1154     577    1732     866     433    1300 
           650     325     976     488     244     122      61     184      92 
            46      23      70      35     106      53     160      80      40 
            20      10       5      16       8       4       2       1 
length of sequence is 134

Histogram of Hailstone Sequences from 400 to 411

Scale is 6 to 1
                                                                        
                                                                        
                                                                        
                                                                     *  
                                                                     *  
                                                                     *  
                                                                     *  
                                                                     *  
                                                                     *  
                                                                     *  
                                                                     *  
                                                                     *  
                                                                     *  
                                                                     *  
                                                                     *  
                                                                     *  
                                                                     *  
                                                                     *  
                                                                     *  
                                       *     *           *           *  
                                       *     *           *           *  
   *                       *     *     *     *     *     *     *     *  
   *     *     *     *     *     *     *     *     *     *     *     *  
   *     *     *     *     *     *     *     *     *     *     *     *  
   *     *     *     *     *     *     *     *     *     *     *     *  
  400   401   402   403   404   405   406   407   408   409   410   411 

linuxserver1[104]