5.1k views
0 votes
Rewrite the following loops, using the enhanced for an array of floating-point numbers. Write your code within comments

a. for (int i = 0; i < values.length; i++) { total = total + values[i]; }
b. for (int i = 1; i < values.length; i++) { total = total + values[i]; }
c. for (int i = 0; i < values.length; i++) { if (values[i] == target) { save = i; }.

User Xeranic
by
6.5k points

1 Answer

2 votes

Answer:

Explanation:poop

User Sertug
by
5.7k points