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, 21.06.2019 18:40
Access defaults to searching for information on the
Answers: 1
question
Computers and Technology, 22.06.2019 15:30
To increase sales, robert sends out a newsletter to his customers each month, letting them know about new products and ways in which to use them. in order to protect his customers' privacy, he uses this field when addressing his e-mail. attach bcc forward to
Answers: 2
question
Computers and Technology, 23.06.2019 03:50
Q-1 which of the following can exist as cloud-based it resources? a. physical serverb. virtual serverc. software programd. network device
Answers: 1
question
Computers and Technology, 23.06.2019 06:00
Which statistical function in a spreadsheet you to see how far each number varies, on average, from the average value of the list?
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
Physics, 12.07.2021 05:00
question
Mathematics, 12.07.2021 05:00
Questions on the website: 13722362