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) {
final int num_vals = 4;
int[] testgrades = new int[num_vals];
int i = 0;
int sumextra = -; // assign sumextra with 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: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:00
Someone with this coz i don’t really know what i can choose, just pick whatever u want. homework - you need to choose a website that you like or use frequently. you must visit the website and discuss 6 different features/parts/aspects of the website that you think makes it good. (100 words)
Answers: 2
question
Computers and Technology, 22.06.2019 16:30
The most common battery cable terminal is a that provides a large surface contact area with the ability to tighten the terminal onto the battery post using a nut and bolt.
Answers: 2
question
Computers and Technology, 22.06.2019 17:00
Aisha has finished working on a word processing document that contains 15 pages. she has added some special elements in the first three pages, page 9 and 10, and page 15 from the document. she wants to print only these pages to see how they look. which option is the correct way to represent (in the print dialog box) the pages that aisha wants to print
Answers: 3
question
Computers and Technology, 23.06.2019 06:30
You have a small company and want to keep your costs low, but it is important your employees share data. which network would provide you with the most economical solution?
Answers: 1
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, 28.10.2020 02:20
question
Mathematics, 28.10.2020 02:30
question
Mathematics, 28.10.2020 02:30