Answer:
Following are the code to this question:
for (i = 0; i <3; ++i)//defining loop to print value
{
cout<<runTimes[i]<<endl;//print value
}
Explanation:
Full program code to this question:
#include<iostream>//defining header file
using namespace std;
int main() //defining main method
{
const int NUM_ELEMENTS = 5;//defining const integer variable
int runTimes[NUM_ELEMENTS]; //defining integer array
int i;//defining integer variable
for (i = 0; i < NUM_ELEMENTS; ++i)//defining loop to input value
{
cin >> runTimes[i];//input value
}
cout<<"print three elements value of array: "<<endl;
for (i = 0; i <3; ++i)//defining loop to print value
{
cout<<runTimes[i]<<endl;//print value
}
return 0;
}
Output:
Please find the attachment.
Description: