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
Driving is expensive. Write a program with two inputs, a car's miles/gallon and the cost of gas/gallon both represented as doubl
Nataly_w [17]

Answer:33

Explanation:

6 0
2 years ago
Case project 5-1 Network Integration ​
oee [108]

Answer:

You need to explain the entire network layout first.

Explanation:

Bringing on new IT Staff can be time consuming.  But depending on the possession you need to explain to them how the domain lay out is.  

4 0
3 years ago
The apparent magnitude of a star is the brightness of a star
Lana71 [14]
<span>c. as seen from the Earth without the effect of the atmosphere</span>
6 0
3 years ago
Read 2 more answers
Describe a strategy for avoiding nested conditionals. Give your own example of a nested conditional that can be modified to beco
Alina [70]

Answer:

plz like and rate and mark for brainlist

Explanation:

Give your own example of a nested conditional that can be modified to become a single conditional, and show the equivalent single conditional. Do not copy the example from the textbook. The best strategy for avoiding nested conditionals is to use logical operators like: and, or, not.

8 0
2 years ago
PLEASE HELP WITH THESE QUESTIONS!!!! 19 POINTS!!!!!
Anton [14]
1. C.) Macintosh
2. B.) Semiconductor
3. D.) Microchip
8 0
3 years ago
Read 2 more answers
Other questions:
  • Which loan type requires you to make loan payments while you’re attending school?
    10·1 answer
  • ) Consider a router that interconnects four subnets: Subnet 1, Subnet 2, Subnet 3 and Subnet 4. Suppose all of the interfaces in
    11·1 answer
  • Într-o curte sunt G găini și O oi. Să se determine numărul de capete și numărul de picioare din curte.
    13·1 answer
  • How do you create a reference page in apa format with all websites?
    5·1 answer
  • What does DKIM stand for?
    9·2 answers
  • Which PlayStation was the first to allow connection between it and computer network
    12·1 answer
  • What are two software tools for bank account reconciliation?
    8·2 answers
  • Which of the following would be the most appropriate way to address and greet your teacher, Mr. Joseph Herman, in an email? Hi J
    7·1 answer
  • Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integer
    9·1 answer
  • Imagine an everyday scenario in which you are using the internet: downloading a file, uploading a photo, checking your email, et
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!