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
FinnZ [79.3K]
3 years ago
5

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

it is 100, so anything over 100 is extra credit. Ex: If testGrades
Computers and Technology
1 answer:
diamong [38]3 years ago
4 0

Answer:

Replace

/* Your solution goes here */

with

sumExtra = 0;

for (i =0; i<NUM_VALS;i++){

if(testGrades[i]>100){

sumExtra = sumExtra - testGrades[i] + 100;

}

}

Explanation:

This line initializes sumExtra to 0

sumExtra = 0;

The following is a loop from 0 to 3

for (i =0; i<NUM_VALS;i++){

The following if condition checks if current array element is greater than 100

if(testGrades[i]>100)

{

This line calculates the extra credit

sumExtra = sumExtra - testGrades[i] + 100;

}

}

<em>See attachment for complete question</em>

Download docx
You might be interested in
How can the font type of an existing style named No Spacing be changed?
sergejj [24]

Answer: it depends on the font size

Explanation:

8 0
3 years ago
Read 2 more answers
Is a storyboard an example of an implemation tool?
goblinko [34]
Yes, the answer is true.
8 0
3 years ago
Read 2 more answers
How to get fast frontend development online job as a beginner?​
mezya [45]

Answer:

hmmm well what is your magager?? every job will ask you what you can do.

3 0
3 years ago
The size of the board is one of the differences between Elevens and Thirteens. Why is size not an abstract method?
Levart [38]

Answer:

The program keeps track of the size of the board in cards.size(). The sub class sets this by passing it into the constructor. After that, the subclass never cares about the size of the board, so it's not necessary to make it accessible with an abstract method. Any need for it is covered by cardIndexes method.

Explanation:

The differences between Elevens and Thirteens

The program keeps track of the size of the board in cards.size(). The sub class sets this by passing it into the constructor. After that, the subclass never cares about the size of the board, so it's not necessary to make it accessible with an abstract method. Any need for it is covered by cardIndexes method.

5 0
3 years ago
What is the output of the following code snippet? int i = 1; while (i != 9) { System.out.print(i + " "); i++; if (i == 9) { Syst
Monica [59]

Answer:

1 2 3 4 5 6 7 8 End

Explanation:

int i = 1;

while (i != 9){

  System.out.print (i + " ");

  i ++;

  if (i == 9){

     System.out.println("End");

  }

}

7 0
2 years ago
Other questions:
  • Which sparkline type is best for displaying trends in data changes over time?
    11·1 answer
  • How does the occupational outlook affect the monetary benefits of a career
    11·1 answer
  • Paragraph talking about why i chose bill gates
    10·1 answer
  • When an IRET instruction isexecuted, what action takes place?
    13·1 answer
  • May indicate elevation
    14·2 answers
  • Students who respond promptly to e-mails are following which netiquette rule?
    13·2 answers
  • Which precaution should be taken when working inside computer systems??
    9·1 answer
  • What specific record type is found in every zone and contains information that identifies the server primarily responsible for t
    10·1 answer
  • What will be the results of the following code? final int Array_Size = 5;An error will occur when the program runs. There will b
    10·1 answer
  • Being nice take the points​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!