Question: Code the FULL C++ program. You will need to: Create a new C++ program Then code the main function so that it performs the task

Code the FULL C++ program. You will need to:

  1. Create a new C++ program
  2. Then code the main function so that it performs the task listed below
  3. When you are done, copy your full program and place it into the Answer box.

In the main function:

  • Create a four element integer array and initialize the array with these values 0, 0, 0, and 0. Note this needs to be done in one line of code.
  • Using a for loop, loop through the array and alter the values to 100, 200, 300 and 400
  • Next loop through the array and display the contents of the array to the user.

The format of the output should look like:

The array value is : 100 The array value is : 200 The array value is : 300 The array value is : 400

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!