Hello all, my C++ instructor gave us a practice program to write (in preparation for our upcoming exam). It involved arrays. I am awful at C++ and don't know where to begin. If anyone could give me any pointers or hints or a little code; that would be fantastic!
Here's the beginning 2 steps:
1. Declare an array to hold 200 integers (which represent scores) and fill it with random values in the range of 50 to 100. Then place the value 100 in the very first array element and the value 45 in the very last. Implement this as a function.
2. Display the elements of the array, 20 per line with space between each number. Each number should take up the same amount of space (the same width) on the screen Write a second function to do this. It should begin by displaying a title: "The Array". Hint: as you go through the array, displaying the elements, check the each subscript before displaying the element - if the subscript is a multiple of 20, output an endl first.
0 · ·