subject

Vector 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) {
final int num_vals = 4;
int[] testgrades = new int[num_vals];
int i = 0;
int sumextra = -; // initialize to 0 before your for loop

testgrades[0] = 101;
testgrades[1] = 83;
testgrades[2] = 107;
testgrades[3] = 90;

/* your solution goes here */

system. out. println("sumextra: " + sumextra);

return;
}

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 24.06.2019 11:40
100 pts. first person gets brainliest
Answers: 2
question
Computers and Technology, 24.06.2019 13:00
Which one of the following functions is not available on the autosum tool? sum average if max
Answers: 3
question
Computers and Technology, 24.06.2019 13:50
What does code do? a creates a text box that says "solid black" b creates a black border of any width c creates a black border 1 pixel wide
Answers: 1
question
Computers and Technology, 25.06.2019 01:00
Regular maintenance is a key component of automotive lift safety.
Answers: 1
You know the right answer?
Vector testgrades contains num_vals test scores. write a for loop that sets sumextra to the total ex...
Questions
question
Mathematics, 22.10.2019 23:50
Questions on the website: 13722362