1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Helen [10]
4 years ago
10

Array testGrades contains NUM_VALS test scores. Write a for loop that sets sumExtra to the total extra credit received. Full cre

dit 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 = -9999; // 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;
}
}
Computers and Technology
1 answer:
nirvana33 [79]4 years ago
7 0

Answer:

sumExtra=0;

       for(i=0;i<NUM_VALS;i++)    // NUM_VALS is 4 declared above already

       {

           if(testGrades[i]>100)     //to check if there is extra credit or not

           {

               sumExtra+=(testGrades[i]-100);     //only extra credit will added

           }

       }

Explanation:

Above is the code segment that needs to be put in  the blank.

You might be interested in
. What is an APT? What are some practical strategies to protect yourself from an APT?
viva [34]

Answer and Explanation:

Advanced Persistent Threat abbreviated as APT is a type of cyber attack which gives access to the unauthorized user  to enter the network without being detected for a long period.

APTs are generally sponsored by the government agencies of the nation or large firms. For example, one of the ATPs used was Stuxnet in the year 2010 against Iran, in order to put off the nuclear program of Iran.

Some of the practical strategies for protection against APT are:

  • Sound Internal Auditing
  • Strong Password Accessing Policies
  • Stringent policies for accessing any device
  • Introduction and implementation of multi factor authentication
  • Strong IDs and sound honeypot solutions
3 0
3 years ago
Pls help will mark brainliest as soon as u awnser
NNADVOKAT [17]

Answer:

The answer is...

Explanation:

It is A or D I would go with D tho

Hope this helped

:)

5 0
3 years ago
What is a peripheral device?
saul85 [17]

Answer:

a peripheral device is a device used to put information into as well as get information out of a computer

Explanation:

4 0
3 years ago
What is a good principle to implement when you find yourself attempting to
Maurinko [17]

its less is more A

to much could make it really bad

5 0
4 years ago
Who is Carl Thompson?
pishuonlain [190]
Carl Thompson was a well know Jazz player back in the mid 1900s
7 0
3 years ago
Other questions:
  • To avoid potential documentary errors and security leaks, the configuration of firewalls should not be documented unless strictl
    5·1 answer
  • Which of the following statements will assign the contents of the Text property of a Textbox control named txtInput into the Tex
    10·1 answer
  • 7.4.1C The global distribution of computing resources raises issues of equity, access, and power. Briefly describe one of these
    11·1 answer
  • How does limiting a company's scope benefit the company?
    15·2 answers
  • When replacing a system board in a laptop, which feature is a must?
    10·1 answer
  • What parts make cars a system?
    11·2 answers
  • An employee clicks on a link in an email from what looks like a fellow employee and is taken to a fraudulent web site which asks
    6·2 answers
  • Write a programe to add two numbers using function with return type"void".
    14·1 answer
  • How many devices can I sign in on with my one Brainly account?
    5·2 answers
  • What does dr. sanford say about the comparison of the genome with a computer program?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!