Objectives
- Follow instructions (program requirements)
- Declare and use a constant
- Create and use arrays
- Create and use functions
- Create prototypes for functions
- Create random numbers
- Use repetition
- Pass arrays to functions
- Format output
This assignment involves creating an array and three functions to process an array. The first function fills an array with random numbers. The second function calculates a sum for the elements of an array. The third function displays an array in a nice format.
14 82 77 6 41 12 39 15 23 19 32 17 71 7 The total is 455 The average is 32.5
30 26 56 28 2 70 89 49 1 81 24 56 1 61 94 44 68 50 46 45 33 41 92 38 30 33 38 88 59 96 30 43 23 39 33 60 9 62 61 46 The total is 1875 The average is 46.875
32 75 87 18 60 60 8 56 56 75 89 53 25 30 47 75 37 14 16 88 89 57 81 1 15 88 35 90 67 37 42 54 69 43 95 46 88 42 46 42 The total is 2128 The average is 53.2