haileesavannah3915 haileesavannah3915
  • 06-04-2021
  • Computers and Technology
contestada

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

Respuesta :

Jamesanny20
Jamesanny20 Jamesanny20
  • 08-04-2021

Answer:

Answered below

Explanation:

//Program is written in Java.

public void first three elements(int[] nums){

int I;

//Check if array has up to three elements

if(nums.length > 3){

for(I = 0; I < nums.length; I++){

while (I < 3){

System.out.println(nums [I]);

}

}

else{

System.out.print("Array does not contain up to three elements");

}

}

}

Answer Link

Otras preguntas

How to name tenary compounds
Can ubplz help mevwith 5
Which letter correctly labels the mississippi river?
What is the difference between 6z and z6?
2. What happened as a result of the so-called Intolerable Acts? A. The port of Boston was closed. B. The famous Boston Tea Party was planned. C. A Committee
Felicia: Quiero comprar un par de aretes pero no quiero caminar en el sol todo el día. Marc: Entonces, puedes ir __________________. a la feria artesa
How do you write 8.825 in words?
What government entity first employed infamous fbi director j. edgar hoover?
Please help!! Plato question
________ people typically do not live as long as the average life expectancy.