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
What is a ribbon in word
nika2105 [10]
A ribbon is somehing ou earn
7 0
3 years ago
Read 2 more answers
When a communication exchange that does not verify the identity of the endpoints of a communication and accepts any properly for
ELEN [110]

Answer:

True

Explanation:

When communication exchange that does not verify the identity of endpoints of communication is true

3 0
3 years ago
Does a soda vending machine Give reciepts?<br><br>need for computer science hw
kupik [55]
No, they do not give receipts.<span />
6 0
3 years ago
Read 2 more answers
Which access object cannot be used to enter or edit data
kap26 [50]

Answer:

Should be B. table !

6 0
2 years ago
Read 2 more answers
The phone in your hand is a computer. So too is the machine that occupies a 100,000 square foot data center. Given their vast di
Dmitry [639]

Answer:

Well when you think about it they both do the same thing but they are diffirent, they have the same perpose but diffirent parts in them so, when you compair them the phone is smaller and slower, the bigger the computer the better it is depending on the amount of money spent on parts.

5 0
3 years ago
Other questions:
  • Please look at picture
    10·2 answers
  • Jared does not update his computer’s system software. What threat does his computer face?
    9·1 answer
  • What do you call the process of translating statements written by a developer? What is the result of this process?
    6·1 answer
  • Is there truth? Does truth exists?
    14·2 answers
  • A page with no meaningful content that is full of ads and the webmaster makes money from if someone clicks on them is called____
    7·1 answer
  • How do optical discs store data? select one:
    15·1 answer
  • My computer just fried anybody know why it did that?
    14·2 answers
  • Why security must be planned, tested, and ready by the time the erp implementation is at go-live?
    11·1 answer
  • What are the tools in creating an animation?
    7·1 answer
  • Which option should Gina click to edit the text contained in a text box on a slide in her presentation?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!