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, 21.06.2019 23:00
What is one of the main problems that can occur when implementing a large number of new systems within an organization?
Answers: 1
question
Computers and Technology, 22.06.2019 17:00
What allows you to create a wireless connection among your smart devices
Answers: 2
question
Computers and Technology, 22.06.2019 21:00
Which of these is most responsible for differences between the twentieth century to the twenty-first century?
Answers: 2
question
Computers and Technology, 22.06.2019 22:00
What is the name of the option in most presentation applications with which you can modify slide elements? 1. the option enables you to modify a slide element in most presentation applications.
Answers: 3
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
Biology, 19.03.2020 23:28
question
Mathematics, 19.03.2020 23:28
Questions on the website: 13722367