Write a C++ program named, arrays.cpp

mulung
 (Not rated)
 (Not rated)
Chat

Write a C++ program named, arrays.cpp, with the following functions: (name functions EXACTLY as given below, including return type and parameter list – As with the previous project, your functions will be tested by a separate program, different from your own version of main.)

Coding Requirements and Restrictions

All variables must be declared locally to a function. No global variables.
Make sure your program has good prompts and clearly labeled output. Add blank lines to the output to improve its readability.
Do NOT use any language constructs that have not been covered in class.
Make your code readable by using meaningful variable names, indentation and spacing – in other words, ALL of the coding conventions for this course.
All functions must be documented with a description.

Use the following algorithm for the main function
declare list to be an array to hold 100 integer
(note: array is ALWAYS 100 integers long, but user may not use them all)
declare number to an an integer
prompt for a value from 3 to 100 and store the input into number
call fillArray (list, number)
call printArray (list, number)
output the result of calling countAboveAverage (list, number, average(list, number))
call printConsecutive (list, number)
output the result of calling coverage (list, number)
So, while the array is declared to have 100 elements, the number of elements used is the number entered by the user (3..100). This is why the user's input value (n) is passed around to the various functions: so these functions know how many elements of the array to use. The unused elements should be ignored.

    • 13 years ago
    BEST SOLUTION ANSWER
    NOT RATED

    Purchase the answer to view it

    • arrays.cpp