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]
4 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]4 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
What is the output?<br> &gt;&gt;&gt; password = "sdf#_356"<br> &gt;&gt;&gt; password.isalnum()
Nat2105 [25]

Answer:

Think the output is False because the string password contains #.

Explanation:

please rate Brailliest if you happy. keep in touch if you need any further assistance.☺️

8 0
3 years ago
Read 2 more answers
In the early days of photography, cameras were limited to professional photographers because of the knowledge needed to work the
FinnZ [79.3K]
True they had to be developed in a special way in a dark room with several chemicals. 
3 0
4 years ago
Read 2 more answers
Finish the program by choosing the correct terms.
juin [17]
What are the exact numbers
6 0
3 years ago
Read 2 more answers
What is a collection of web pages containing text images audio and videos.​
Nata [24]

Answer: A website..?

6 0
3 years ago
Budd, the purchasing agent of Lake Hardware Wholesalers, has a relative who owns a retail hardware store. Budd arranged for hard
Misha Larkins [42]

Answer:

We cannot answer this question!

Explanation:

Because the question is incomplete!

8 0
3 years ago
Other questions:
  • Write a program that defines a type for a structure that stores information on a student in ENG EK 125. Declare two variables to
    8·1 answer
  • Let's say that you handle the IT systems administration for your company. There's a server inside of your organization that chec
    14·1 answer
  • âwhen the footer is the last element in a page body, the _____ pseudo-element is used to add a placeholder element after the foo
    8·2 answers
  • Most internet connections use what transmission
    13·2 answers
  • Which one is correct?
    7·2 answers
  • Helpppp plsssss!!!<br><br>thanks.
    7·1 answer
  • The basic assumption that underlines event driven modeling is that the system can be represented as a model with an infinite num
    9·1 answer
  • Name three output devices
    6·1 answer
  • The sun emits invisible _____&gt; A) electromagnetic waves B) Waves C) Radiation D) Wavelength E) Ultraviolet Light
    8·1 answer
  • The History feature of a browser enables you to retrace your browsing history over a short period of time. (1 point) True False
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!