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
grin007 [14]
3 years ago
13

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; 3 public class SumoFExcess ( 4 public static void main (String [ args) ( Scanner scnr -new Scanner (System.in); final int NUM VALS -4 int[] testGrades-new int[NUM VALS]; int ij int sunExtra 9999; 11 Assign sunExtra with 0 before your for loop 10 for (i-0; ǐ < testGrades.length; +.1) { testGrades[1]-scnr.nextInt) 12 14 15 / Your solution goes here 16 System.out.printin("sumExtra:sumExtra);
Computers and Technology
1 answer:
Soloha48 [4]3 years ago
5 0

Answer:

12.       for (i = 0 ; i < testGrades.length ; i+=1 ){

13.           if (testGrades[i] > 100){

14.              sumExtra = sumExtra + testGrades[i] - 100;}

15.       }

Explanation:

We first iterate through the entire testGrades array. For each test score that is in testGrades ( that is testGrades[i] ), we see whether or not the test grade is above 100 (See line 12) . If test grade is greater than 100, this means we have extra credit. We simply subtract 100 from the test grade, add it with the previous value of sumExtra and store the value back in sumExtra(see line 14). Once i is greater than the length of the test grades, the loop is exited. We can now print sumExtra to obtain the result.

You might be interested in
Can I have some help?
Ad libitum [116K]
I believe its A as the image provided says plain message
6 0
2 years ago
WILL MARK BRAIN LIST!
Maslowich
I think it’s a

if it isn’t a then it’s d
6 0
3 years ago
Read 2 more answers
Portraits should not ever include any objects other than the person. <br>True <br>False
KonstantinChe [14]

Answer:

False

Explanation:

Be safe and make good choices!!

8 0
3 years ago
How do i work this out? does anyone do programming?
Pavlova-9 [17]
Answer : No sorry ..
6 0
3 years ago
When you point to defined styles in the cell styles gallery, you can see the formatting that will be used when you apply each st
Dvinal [7]
Hello  <span>Missthang2456 </span>

Question: <span>When you point to defined styles in the cell styles gallery, you can see the formatting that will be used when you apply each style?


Answer: This is true

Hope This Helps!
-Chris</span>
4 0
3 years ago
Other questions:
  • What is the Windows command to see the IP configuration of the PC?
    15·1 answer
  • Maria is developing an online gaming website. She is working on an interactive game that has a central character guiding the vis
    14·2 answers
  • An advertisement for new headphones lists the cool colors available, the great sound quality, and the fabulous reviews but fails
    14·1 answer
  • HELP FOR JAVASCRIPT: 01. What is prototypical inheritance? 02. How can JavaScript be used to improve accessibility on the web? I
    6·1 answer
  • When dealing with a person who is behaving violently you should argue with them. A. False B. True
    5·1 answer
  • Describe the best way to deal with a difficult co-worker?
    13·2 answers
  • When you take a multiple-choice test, you are relying on ________, a means of retrieving information out of your long-term memor
    8·1 answer
  • Disk ____ is the ability to spread data over multiple disks or volumes
    7·1 answer
  • Random Access Memory is tempory computer memory that stores works in progress
    7·1 answer
  • Write a declaration of a variable named count that can be used to hold numbers like 90000 and -1 and -406.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!