Question: Integer numBenefits is read from input, representing the number of integers to be read next. Then, the remaining integers are read and stored into

Integer numBenefits is read from input, representing the number of integers to

 be read next. Then, the remaining integers are read and stored into array benefitsArray. For each element in benefitsArray that is less than 170:

Integer numBenefits is read from input, representing the number of integers to be read next. Then, the remaining integers are read and stored into array benefitsArray. For each element in benefitsArray that is less than 170: Output the element, followed by ": corrected to 70 plus the current value" and a newline. Assign the element with the element's current value plus 70. Ex: If the input is: 3 225 125 65 then the output is: Raw benefits: 225 125 65 125: corrected to 70 plus the current value 65: corrected to 70 plus the current value Adjusted benefits: 225 195 135. 1 import java.util.Scanner; 4234 in 1890 3 public class ArrayResize { 5 6 7 10 11 TELEP RP 4557WNI 12 13 14 15 16 17 public static void main(String[] args) { Scanner scnr = new Scanner(System.in); int[] benefitsArray; int numBenefits; int i; numBenefits scnr.nextInt(); benefitsArray = new int [numBenefits]; for (i = 0; i < benefitsArray.length; ++i) { benefitsArray[i] = scnr.nextInt (); } 14 4567 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 m for (i = 0; i < benefitsArray.length; ++i) { benefitsArray[i] = scnr.nextInt (); } System.out.print("Raw benefits: "); for (i = 0; i < benefitsArray.length; ++i) { System.out.print (benefitsArray[i] + 11 } System.out.println(); /* Your code goes here */ System.out.print("Adjusted benefits: "); for (i = 0; i < benefitsArray.length; ++i) { System.out.print (benefitsArray[i] + } System.out.println();

Step by Step Solution

3.45 Rating (145 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

import javautilScanner public class ArrayResize public static void mai... 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!