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, 23.06.2019 06:00
What makes myhexadecimalnumber a child of mynumber? which methods does myhexadecimalnumber inherit directly from the mynumber class? what can an instance of the mynumber class do? what can an instance of the myhexadecimalnumber class do? which methods are overridden? why are they overridden? how many examples of overloading are there? why was this done? where is the super keyword used? what is it doing? why isn’t the incoming value set immediately in the second myhexadecimalnumber constructor? how many examples can you find of an inherited method being called?
Answers: 1
question
Computers and Technology, 24.06.2019 08:30
Aconsumer would pay an extra they used the rent to own program to buy the computer, rather than using cash. for all of the items, is the cheapest option over the life of the contract. the most expensive overall option is to use purchase the item.
Answers: 2
question
Computers and Technology, 24.06.2019 21:30
How do i copy and paste equations and pictures like math graphs, to post on this site to get my questions answered?
Answers: 2
question
Computers and Technology, 24.06.2019 22:30
In writing a paper for his english class, gavin quoted an author of the book. what should he include in his paper to credit the source? citation caption header entry
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
Computers and Technology, 05.02.2021 01:20
question
Mathematics, 05.02.2021 01:20
question
French, 05.02.2021 01:20
question
Mathematics, 05.02.2021 01:20
Questions on the website: 13722363