[Solved]Java Programming Write Loop Subtracts 1 Element Lowerscores Element Already 0 Negative Ass Q37056320
Java Programming:
Write a loop that subtracts 1from each element in lowerScores. If the element was already 0 ornegative, assign 0 to the element. Ex: lowerScores = {5, 0, 2, -3}becomes {4, 0, 1, 0}.
CHALLENGE ACTIVITY 7.7.1: Decrement array elements. Write a loop that subtracts 1 from each element in lowerScores. If the element was already 0 or negative, assign 0 to the element. Ex: lowerScores (5, 0, 2,-3) becomes (4, 0,1, 0 1 public class StudentScores 2 public static void main (String args) final int SCORES-SIZE = 4; int[ lowerScores new int[SCORES SIZE]; int i; 4 lowerScores[0] = 5; lowerScores 1-0; lowerScores[2] = 2; lowerScores[3] -3; 12 13 14 15 *Your solution goes here * for (i = 0; 1 くlowerScores. 1ength; ++i) { System.out.printClowerScoresi]”; System.out.println; 18 Show transcribed image text CHALLENGE ACTIVITY 7.7.1: Decrement array elements. Write a loop that subtracts 1 from each element in lowerScores. If the element was already 0 or negative, assign 0 to the element. Ex: lowerScores (5, 0, 2,-3) becomes (4, 0,1, 0 1 public class StudentScores 2 public static void main (String args) final int SCORES-SIZE = 4; int[ lowerScores new int[SCORES SIZE]; int i; 4 lowerScores[0] = 5; lowerScores 1-0; lowerScores[2] = 2; lowerScores[3] -3; 12 13 14 15 *Your solution goes here * for (i = 0; 1 くlowerScores. 1ength; ++i) { System.out.printClowerScoresi]”; System.out.println; 18
Expert Answer
Answer to Java Programming: Write a loop that subtracts 1 from each element in lowerScores. If the element was already 0 or negati… . . .
OR

