156k views
5 votes
Write three statements to print the first three elements of array runTimes. Follow each statement with a newline. Ex: If runTime

User Shanaya
by
5.9k points

1 Answer

4 votes

Answer:

Statements to print the first three elements of array runTimes are as following:-

cout<<runTimes[0]<<endl;

cout<<runTimes[1]<<endl;

cout<<runTimes[2]<<endl;

Step-by-step explanation:

These three statements written in C++ language.Since we know the indexing of the array starts with the number 0.So the first element will be at index 0 and then indexing increasing by one for next element.

So first element will be present at index 0 second will be present at index 1 and third will be present at index 2.

So we can directly print the array elements by their indexes and after each using a new line character endl to go to the next line.

User Zainul Abideen
by
6.2k points