Question: Given the integer array average Temps with the size of NUM_IN, write a for loop that sums each integer of average Temps together until

Given the integer array average Temps with the size of NUM_IN, write

Given the integer array average Temps with the size of NUM_IN, write a for loop that sums each integer of average Temps together until either maxSum is greater than or equal to 150 or the end of the array is reached. Ex: If the input is 11 4 9 1 10 14 8 5, then the output is: Maximum sum: 62 3 public class ThresholdTracker { tin6789SCTED 4 5 PHP 10 11 12 13. 14 15 16 17 18 19} public static void main(String[] args) { Scanner scnr = new Scanner(System.in); final int NUM_IN = 8; int[] average Temps = new int [NUM_IN]; int i; int maxSum; } for (i = 0; i < averageTemps.length; ++i) { average Temps[i] scnr.nextInt (); } /* Your code goes here */ System.out.println("Maximum sum: = 11 + maxSum);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

import javautilScanner public class ThresholdTracker public static void mainString args Scanner scnr ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!