Question: Write a C++ program - create a 1-d array. Its data type is integer. It has 10 elements. - initialize this array by 10 integer
Write a C++ program - create a 1-d array. Its data type is integer. It has 10 elements. - initialize this array by 10 integer numbers. Five elements of the array are positive, and others are negative. - use a while loop to manipulate the array as below. - If the value of an element is positive, the value is doubled. Otherwise, the value is incremented by 3. - print the new value of each element. - use a for loop to calculate the sum of all elements. - calculate the average of all elements
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
