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
The engine that runs the computer. Small computers have one, while larger computers may
Dmitrij [34]

Answer:

CPU.

Explanation:

A processor, also known as a Central Processing Unit, is a piece of hardware in a computer that performs basic operations and control when executing program code.

Processors are usually made as integrated circuits closed in a hermetic casing, often with gold-plated leads (used for resistance to oxidation) and in this form they are called microprocessors - in common speech the terms processor and microprocessor are used interchangeably. The heart of the processor is a single crystal of silicon, on which a series of semiconductor layers have been applied by means of photolithography, forming, depending on the application, a network of several thousand to several billion transistors. Its circuits are made of metals with good electrical conductivity, such as aluminum and copper.

7 0
3 years ago
Does anyone else realize how the only tutor is for math never any other subjects?​
Slav-nsk [51]

Answer:

yes I do and I wonder why ??

7 0
3 years ago
Consumers must learn how to separate the truth from __ techniques
dmitriy555 [2]

Consumers must learn how to separate the truth from deceptive techniques.

Explanation:

Deceptive advertisements are hazardous for both consumer and advertiser. It is a misrepresentation of the nature of products or services promoted falsely by advertisers.

Professionals exploit consumers by following means:

  • false or incomplete information,
  • fraudulent activities
  • deceptive practices.

It may involve -

  • financial theft,
  • health risks,
  • scams, etc.  

Having proper knowledge about such practices and taking legal actions against fraudsters can help claim for the damages incurred.

3 0
4 years ago
Which of the following is a form of security protection that protects individual files by scrambling the contents in such a way
Alla [95]

Answer: C. File encryption

Explanation: To ensure security and privacy of files and its content, encrypting the file may be an option. File encryption refers to a process of ensuring the security and privacy of individual files so as to prevent unauthorized access to the content. File encryption works by setting up a security key which will be requested or needed when the file is being clicked such that only users or individuals with the authorized pass code or password can open and read its content or modify the file, this is called file decryption.

8 0
3 years ago
Give three reasons why you think Clip Art is so widely used in many different types of documents.
irinina [24]
Well Here Are Some Advantages To Clip Art,
There Is A Large Variety Of Clip Art To Choose From.
You Don't Need To Buy Any Special Equipment Like A Scanner.
It Takes No Artistic Skills To Produce.
Most Clip Art Is Royalty And Copyright Free.
It Doesn't Have To Be Developed From Scratch.
Hope I Helped
6 0
3 years ago
Read 2 more answers
Other questions:
  • 3. Why did Steve Jobs and Steve Wozniak start working on developing computers?
    5·1 answer
  • A wall is built of bricks. What force is being applied to each brick from the bricks above? ​
    7·1 answer
  • The main workplace of a Windows computer is called the
    14·1 answer
  • Who was responsible for unleashing the melissa computer virus
    15·1 answer
  • The number of pixels displayed on the screen is known as ​
    12·1 answer
  • What is the force that resists the motion of an object through a fluid?
    6·1 answer
  • Develop Swimlane Activity diagram for Assignment announcement and submission system.
    6·1 answer
  • I AM GIVING BRAINLIEST!!!!!!! PLEASE HELP !!!!!!!!
    7·2 answers
  • What’s GIGO<br> Please write it in full form
    15·1 answer
  • Does anyone know the answer
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!