Question: jAVA 4. (15 points; 3 points eachpart ) Trace the loops below in the tables to the right. If the loop is an infinite loop,

jAVA
4. (15 points; 3 points eachpart ) Trace the loops below in the tables to the right. If the loop is an infinite loop, trace three iterations and write "infinite loop". Remember to include the first and last values in the table. a) int accumulator-1 int count-5; while (count count2) count count su countl -countl+ 1; count2-count2 3 sum count1 + count2; c) SU coun for (int count-3; sum !-22; count-count + 4) sum sum + count; d) int sum = 0; for (intindex = 5; sum >= 0; ++index) su inde sum = sum + index; e) int product = 2; for (int count0 product> 2;+product); // pay attention et t to that producoun product-product * product
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
