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

A store sells a 3/1/4 pound package if cheese for $10. What is the unit price?
Give the formula of getting the mean and give an example.
How can air pollution affect ground water??
The most important factor in helping children to build a strong sense of self-efficacy is to A. show them a lot of affection during infancy. B. be a lovi
Evaluate: x = 356 6x × 25 + 671,356,901,735= 156 2/6 + 987 5/10= 4.561789 + 5556.9108= 6*6*9*0*1,000=
Daniela loves the cookies at her favorite restaurant, but she knows they are filled with unhealthy ingredients. Which of the following statements shows how Dani
true or false? living organisms depend only on other organisms to which they are closely related
A population of viruses with similar characteristics is called a _____.
The situational “context” of the poem is also called the dramatic situation True or False
a conveyor belt carries supplies from teh first floor to the second floor, which is 12 feet higher. The belt makes a 60% angle with the ground. How far do the