What is the output of the following C++ code?
const double PI = 3.14159;
double cylinderRadii[5] = {3.5, 7.2, 10.5, 9.8, 6.5};
double cylinderHeights[5] = {10.7, 6.5, 12.0, 10.5, 8.0};
double cylinderVolumes[5];
cout << fixed << showpoint << setprecision(2);
for (int i = 0; i < 5; i++)
cylinderVolumes[i] = 2 * PI * cylinderRadii[i] * cylinderHeights[i];
for (int i = 0; i < 5; i++)
cout << (i + 1) << " " << cylinderRadii[i] << " " << cylinderHeights[i] << " " << cylinderVolumes[i] << endl;
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.