Kat H.

asked • 05/10/21

Declare an array.

Declare an array of 5 doubles called values - initialize it with 1.6, 3.1, 8.3, 9.1, 4.8


Code:


#include <iostream>

#include <iomanip>


using namespace std;


int main()

{

const int NUM_VALUES = 5;


//Do not modify anything on or above the line below this

//YOUR_CODE_BELOW



//YOUR_CODE



//YOUR_CODE_ABOVE

//Do not modify anything on or below the line above this


for(int i = 0; i < NUM_VALUES; i++) {

cout << values[i] << " ";

}

return 0;

}

1 Expert Answer

By:

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.