Answered step by step
Verified Expert Solution
Question
1 Approved Answer
CHALLENGE 5 . 4 . 2 : Iterating through arrays. 5 2 8 0 4 0 . 3 4 8 9 5 2 8 .
CHALLENGE
: Iterating through arrays.
Jump to level
Given the integer array dailyScores with the size of ARRVALS, write a for loop that sets sumBonus to the total bonus points. Scores above contain bonus points.
Ex: If the input is then the output is:
Bonus sum:
Note: To find a bonus point, the point is subtracted by the base point of
import java.util.Scanner;
public class ExtraSumalculator
public static void mainString args
Scanner scnr new Scanner
System.in;
final int ARRVALS ;
int dailyscores new int ARRVALS;
int ;
int sumBonus;
for dailyscores.length; i
dailyscores ;
Y your code goes here
System.out.printlnBonus sum: sumBonus;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started