Question: USING C++ Write the code to: 1. Declare an integer array named stuff with 20 elements 2. Initialize each element of the array stuff to
USING C++
Write the code to:
1. Declare an integer array named stuff with 20 elements
2. Initialize each element of the array stuff to to value 100.
3. Ask the user to enter each value of the array stuff (prompt and input)
4. Print all elements of the stuff array
5. Print all elements of the array stuff in reverse order
6. Sum all elements of the array stuff
7. Determine the average of all elements in the array stuff
8. Find the largest element in the array stuff
9. Subtract 1 from every element of the stuff array.
10. Divide all even-numbered elements in the stuff array (stuff[2],stuff[4],..stuff[20]) by 5, i.e. stuff[2] = stuff[2]/5;...
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
