subject

The code below defines a method to sum the elements of an array of ints. Re-write the loop using a while loop instead of a for loop. The string for must not appear anywhere in your answer (even in a comment) int sumElements(int[] data){
int total = 0;
for (int i = 0; i < data. length; i++){
total += data[i];
}
return total;
}

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:40
Kali, a python programmer, is using the turtle module to write the word “hello.” which code should she use to indicate the location to begin writing the word? a # pick up the turtle and move it to its starting location. b penup(-100, 200) goto() pendown() c penup() goto(-100, 200) pendown() d # pick up the turtle and move it to (-100, 200)
Answers: 2
question
Computers and Technology, 22.06.2019 16:30
Corey set up his presentation for delivery to his team.the information he had to convey was critical to their job performance.he knew he would need a lot of time to explain each point
Answers: 3
question
Computers and Technology, 23.06.2019 14:30
Choose the answers that best complete each sentence. on average,are more expensive than other kinds of postsecondary schools. the cost of room and board includes. to save money, some students attend auniversity in their home state.
Answers: 2
question
Computers and Technology, 24.06.2019 06:30
For which utilities, if any, does the landlord pay?
Answers: 2
You know the right answer?
The code below defines a method to sum the elements of an array of ints. Re-write the loop using a w...
Questions
question
Mathematics, 19.03.2021 21:00
question
Mathematics, 19.03.2021 21:00
question
Mathematics, 19.03.2021 21:00
Questions on the website: 13722362