
Patrick B. answered 05/11/21
Math and computer tutor/teacher
double values[] = {1.6,3.1,8.3,9.1,4.8};
Kat H.
asked 05/10/21Declare 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;
}
Patrick B. answered 05/11/21
Math and computer tutor/teacher
double values[] = {1.6,3.1,8.3,9.1,4.8};
Get a free answer to a quick problem.
Most questions answered within 4 hours.
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.