Write three statements to print the first three elements of array runTimes. Follow each statement with a newline. Ex: If runTime = {800, 775, 790, 805, 808}, print:
800
775
790
#include<iostream>
using namespace std;
int main(){
int runTime [5]= {800, 775, 790, 805, 808};
for(int i=0; i<3; i++){
cout<<runTime[i]<<endl;
}
}
Comments
Leave a comment