Table of Contents





D1 Correct Output

**** 125 D1 ***

How many runs for D1? 2

    Run #1

Enter name of file to read: d1.in1
Not processing data points larger or equal to  7
9.5 is larger or equal to 7 -- throwing away 
100 is larger or equal to 7 -- throwing away 
10 is larger or equal to 7 -- throwing away 
19.4 is larger or equal to 7 -- throwing away 
54.3 is larger or equal to 7 -- throwing away 
7.1 is larger or equal to 7 -- throwing away 

Vector in reverse
-6.543   -2.3   -3.267   -2   -2.8   -5.4   

The average is -3.71833

The numbers ABOVE the average are -2.8  -2  -3.267  -2.3    




    Run #2

Enter name of file to read: d1.in2
Not processing data points larger or equal to  34.5
76.5 is larger or equal to 34.5 -- throwing away 
118.1 is larger or equal to 34.5 -- throwing away 
90.22 is larger or equal to 34.5 -- throwing away 

Vector in reverse
-23.8   9   10   12.8   -50.9   9.2   11   23.3   

The average is 0.0749998

The numbers ABOVE the average are 23.3  11  9.2 12.8    10  9   
Back to table of contents



D2 Correct Output

How many runs for D2? 2

    Run #1

Enter name of file to read: d2a.in1
Enter name of file to read: d2a.in2

The range for the first list is -2 to 100

The range for the second list is -1 to 100

Displaying the list with the largest range in reverse:
Vector in reverse
-2   100   9.5   6.8   5.4   11.2   




    Run #2

Enter name of file to read: d2b.in1
Enter name of file to read: d2b.in2

The range for the first list is -897.6 to -24.1

The range for the second list is -239.3 to 1234.3

Displaying the list with the largest range in reverse:
Vector in reverse
3.2   -239.3   67.8   1234.3   95.4   543.5   4.3   
Back to table of contents



D3 Correct Output

**** 125 D3 ***

How many runs for D3? 4

    Run #1

Enter name of file to read: d3a.in1
Enter name of file to read: d3a.in2
Mismatch at 5 mismatched values are -1 and -2



    Run #2

Enter name of file to read: d3b.in1
Enter name of file to read: d3b.in2
The lists are the same



    Run #3

Enter name of file to read: d3c.in1
Enter name of file to read: d3c.in2
Lists are different, the lengths are not the same



    Run #4

Enter name of file to read: d3d.in1
Enter name of file to read: d3d.in2
Mismatch at 4 mismatched values are 8 and 14
Back to table of contents



D4 Correct Output

**** 125 D4 ***

How many runs for D4? 2

    Run #1

Enter name of file to read: d4.in1

The numbers divisible by 3 in the Vector are:
9 18 

The average of the numbers divisible by 3 is 13.5

The product of the numbers in the EVEN positions is 1386

Vector in reverse
2   18   9   7   5   11   




    Run #2

Enter name of file to read: d4.in2

The numbers divisible by 3 in the Vector are:
12 0 99 

The average of the numbers divisible by 3 is 37

The product of the numbers in the EVEN positions is 41580

Vector in reverse
44   99   14   1   16   5   0   7   10   12   
Back to table of contents



D5 Correct Output

**** 125 D5 ***

How many runs for D5 for D5? 4

    Run #1

Enter name of file to read: d5.in1
Vector in reverse
9   8   7   7   8   9   
SAME backwards as forwards




    Run #2

Enter name of file to read: d5.in2
Vector in reverse
8   1   99   3   4   4   3   2   1   8   
NOT the same backwards as forwards




    Run #3

Enter name of file to read: d5.in3
Vector in reverse
13   45   78   45   13   
SAME backwards as forwards




    Run #4

Enter name of file to read: d5.in4
Vector in reverse
-3   14   5   67   5   4   -3   
NOT the same backwards as forwards
Back to table of contents



D6 Correct Output

**** 125 D6 ***

How many runs for D6? 2

    Run #1

Enter name of file to read: d6.in1
cows in the field, cows in the barn, cows, cows, cows everywhere  
----               ----                          ----             




    Run #2

Enter name of file to read: d6.in2
all the kings horses and all the kings men  
    ---                      ---            
Back to table of contents



D7 Correct Output

**** 125 D7 ***

How many runs for D7? 2

    Run #1

Enter name of file to read: d7.in1

Vector in reverse
99   56   89   89   67   45   22   23   34   34   56   

Unique numbers: 23 22 45 67 99 




    Run #2

Enter name of file to read: d7.in2

Vector in reverse
77   66   33   44   66   77   

Unique numbers: 44 33 
Back to table of contents



D8 Correct Output

**** 125 D8 ***

How many runs for D8? 2

    Run #1

Enter name of file to read: d8.in1
104 too large -- throwing away
220 too large -- throwing away
400 too large -- throwing away
110 too large -- throwing away
111 too large -- throwing away

Frequency counts
0 - 9: 6
10-19: 2
20-29: 1
30-39: 3
40-49: 2
50-59: 3
60-69: 1
70-79: 3
80-89: 4
90-99: 2




    Run #2

Enter name of file to read: d8.in2
-2 negative -- throwing away
-3 negative -- throwing away
100 too large -- throwing away
102 too large -- throwing away
102 too large -- throwing away
103 too large -- throwing away
103 too large -- throwing away
104 too large -- throwing away
104 too large -- throwing away

Frequency counts
0 - 9: 7
10-19: 0
20-29: 0
30-39: 1
40-49: 8
50-59: 3
60-69: 12
70-79: 3
80-89: 0
90-99: 1
Back to table of contents