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
The move toward access instead of ownership is a sign of collaborative consumption.
Nina [5.8K]

Answer:

the answer is true

Explanation:

8 0
3 years ago
(1) Prompt the user to input an integer, a double, a character, and a string, storing each into separate variables. Then, output
Alex787 [66]

Answer:

import java.util.*;

public class Main{

public static void main(String[] args) {

    Scanner input = new Scanner(System.in);

 int intgVal; double dblVal; char chrVal; String strVal;

 System.out.print("Enter integer: ");  

 intgVal = input.nextInt();

 System.out.print("Enter double: ");  

 dblVal = input.nextDouble();

 System.out.print("Enter character: ");  

 chrVal = input.next().charAt(0);

 input.nextLine();

 System.out.print("Enter string: ");  

 strVal = input.nextLine();

 System.out.println(intgVal+" "+dblVal+" "+chrVal+" "+strVal);

 System.out.println(strVal+" "+chrVal+" "+dblVal+" "+intgVal);

 int IntValue = (int) dblVal;

 System.out.print("Cast to an integer: "+IntValue);

}

}

Explanation:

See attachment for complete program where comments were used to explain each line of the program

Download txt
6 0
3 years ago
What should you do if the drive on which you want to install windows server 2012 already has a partition on it containing an ope
Alinara [238K]
Delete those partitions and reformat the drive.
4 0
3 years ago
When was the GoPro camera invented?​
masya89 [10]

Answer:

2002

Explanation:

Please mark me brainliest :)

6 0
3 years ago
An arrangement in which local businesses team up with schools, hiring students to perform jobs that use knowledge and skills tau
Kazeer [188]

It is called a Cooperative program

A Cooperative program refers to a combination of both academic study and vocational activities in one curriculum of education. The purpose of this program is to provide the students with both knowledge in theory and practical skills that make them more prepared in the real world.


4 0
3 years ago
Read 2 more answers
Other questions:
  • If you were to conduct an Internet search on vegetarian restaurants, which of the following searches would be the best
    7·1 answer
  • If you want to have certain icons available regardless of what tab you're using, you should add them to the
    14·1 answer
  • Write a function named printtriangle that receives a parameter that holds a non-negative integer value and prints a triangle of
    7·1 answer
  • You have repaired a broken LCD panel in a laptop computer. However, when you disabled the laptop, you bent the hinge on the lid
    15·1 answer
  • Wireless data networks are particularly susceptible to known ciphertext attacks.
    10·1 answer
  • HELPPPP PLEASE HURRY
    15·1 answer
  • What are your undertale + au ships?
    15·1 answer
  • How to connect apple pencil 2 to ipad 8th generation?
    11·1 answer
  • How can you create a messages to look like an IMessage?
    8·1 answer
  • Web résumés allow you to include extra graphics and images that you would not include in a traditional résumé. Please select the
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!