D level: Do ONE problem out of an assigned pool of 2 problems
Back to rules
- Provide a loop that allows the user to run the program a specified number of times.
- Read a file of floating point numbers into a Vector.
- Filter (throw away) numbers that are larger than or equal
to the first number in the file
- Report the throw-away numbers to the screen.
- Don't include the throw-away or the first number in your Vector.
- Display the contents of the Vector in reverse order.
- Compute and display the average value of the numbers in the Vector.
- Display the numbers in the Vector that are above the average.
- There are two test files.
Back to list of problems
Back to rules
- Provide a loop that allows the user to run the program a specified number of times.
- Read two files of floating point numbers into two Vectors.
You may only use one class. The class may only have one Vector in it.
- Compute and display the range (high and low) of the values in each Vector
- Display the contents of the Vector with the greater range in reverse order
- There are two pairs of test files.
Back to list of problems
Back to rules
- Provide a loop that allows the user to run the program a specified number of times.
- Read two files of floating point numbers into two Vectors.
You may only use one class. The class may only have one Vector in it.
- Compare the two lists of numbers: either display the message
- "Files are identical"
- or display the location where the first difference occurs and the two values where the difference was found.
- or report if they are of different lengths.
- There are four pairs of test files.
Back to list of problems
Back to rules
- Provide a loop that allows the user to run the program a specified number of times.
- Read a file of integers into a Vector.
- Display all the values in the Vector that are evenly divisible by 3.
- Compute and display the average of all the numbers that are divisible by 3.
If there are no numbers divisible by 3, display that information instead.
- Display the product of the numbers in the even POSITIONS.
- Display the contents of the Vector in reverse order.
- There are two test files.
Back to list of problems
Back to rules
- Provide a loop that allows the user to run the program a specified number of times.
- Read a file of integers into a Vector.
- Display the contents of the Vector in reverse order.
- Determine if the Vector is the same backwards as forwards and display that information.
- There are four test files.
Back to list of problems
Back to rules
- Provide a loop that allows the user to run the program a specified number of times.
- Read a search string from the first line of the file
- Read the next line of the file into a Vector of strings.
- Display the Vector of strings on the screen.
- Display dashes under strings from the Vector that
match the search string on the next line of the screen
- There are two test files.
Back to list of problems
Back to rules
- Provide a loop that allows the user to run the program a specified number of times.
- Read a file of integers into a Vector.
- Display the contents of the Vector in reverse order.
- Display the numbers in the Vector that are unique (only appear once in the Vector)
- There are two test files.
Back to list of problems
Back to rules
- Provide a loop that allows the user to run the program a specified number of times.
- Read a file of integers
- Filter (throw away) numbers that are not between 0 and 99
- Use a Vector to record the slot each acceptable number fits into as you read in
- numbers between 0 and 9 fit into slot 0
-
numbers between 10 and 19 fit into slot 1
-
numbers between 20 and 29 fit into slot 2
-
numbers between 30 and 39 fit into slot 3
-
numbers between 40 and 49 fit into slot 4
-
numbers between 50 and 59 fit into slot 5
-
numbers between 60 and 69 fit into slot 6
-
numbers between 70 and 79 fit into slot 7
-
numbers between 80 and 89 fit into slot 8
-
numbers between 90 and 99 fit into slot 9
- Report the filtered numbers (numbers that are thrown away) to the screen as you read in
- Display a chart that shows how many numbers were within the following ranges
0 - 9
10 - 19
20 - 29
30 - 39
40 - 49
50 - 59
60 - 69
70 - 79
80 - 89
90 - 99
- There are two test files.
Back to list of problems
Back to rules
|