subject

Array testGrades contains NUM_VALS test scores. Write a for loop that sets sumExtra to the total extra credit received. Full credit is 100, so anything over 100 is extra credit. Ex: If testGrades = {101, 83, 107, 90}, then sumExtra = 8, because 1 + 0 + 7 + 0 is 8.import java. util. Scanner; public class SumOfExcess { public static void main (String [] args) { Scanner scnr = new Scanner(System. in); final int NUM_VALS = 4; int[] testGrades = new int[NUM_VALS]; int i; int sumExtra = -9999; // Assign sumExtra with 0 before your for loop for (i = 0; i < testGrades. length; ++i) { testGrades[i] = scnr. nextInt(); } System. out. println("sumExtra: " + sumExtra); } }

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 11:20
Http is the protocol that governs communications between web servers and web clients (i.e. browsers). part of the protocol includes a status code returned by the server to tell the browser the status of its most recent page request. some of the codes and their meanings are listed below: 200, ok (fulfilled)403, forbidden404, not found500, server errorgiven an int variable status, write a switch statement that prints out the appropriate label from the above list based on status.
Answers: 2
question
Computers and Technology, 23.06.2019 17:30
Per the municipal solid waste report, what are the most common sources of waste (trash
Answers: 3
question
Computers and Technology, 23.06.2019 22:20
If i uninstall nba 2k 19 from my ps4 will my career be gone forever?
Answers: 2
question
Computers and Technology, 24.06.2019 01:00
What are two ways to access the options for scaling and page orientation? click the home tab, then click alignment, or click the file tab. click the file tab, then click print, or click the page layout tab. click the page layout tab, or click the review tab. click the review tab, or click the home tab?
Answers: 2
You know the right answer?
Array testGrades contains NUM_VALS test scores. Write a for loop that sets sumExtra to the total ext...
Questions
question
Mathematics, 25.03.2021 19:30
question
Biology, 25.03.2021 19:30
Questions on the website: 13722362