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
Ghella [55]
3 years ago
3

Write a program named TestScoreList that accepts eight int values representing student test scores. Display each of the values a

long with a message that indicates how far it is from the average. An example of how the results should be output is as follows:
Test # 0: 89 From average: 6

Test # 1: 78 From average: -5

Computers and Technology
1 answer:
Otrada [13]3 years ago
3 0

Answer:

import java.util.Scanner;

public class TestScoreList {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       int [] testScores = new int[8];

       int sumScores =0;

       for(int i=0; i<testScores.length; i++){

           System.out.print("Enter Test scores: ");

           testScores[i]= in.nextInt();

           sumScores+=testScores[i];

       }

       double ave = sumScores/8;

       System.out.println("The Average is: "+ave);

       for(int i =0; i<testScores.length; i++){

           System.out.println("Test # "+i+": "+testScores[i]+" From Average "+

                   (testScores[i]-ave));

       }

   }

}

Explanation:

Using Java programming Language

Create an array of size 8

Prompt user to enter test scores values using a for loop

Using another for loop, find sum and average

Using a third for loop, format output as required by the question using string concatenation

See code output attached.

You might be interested in
TRY IT Choose the Right Technology MP3 player Widescreen laptop computer Smartphone Tablet computer with wireless Internet Suppo
Gnoma [55]

is this like a story or sum

3 0
3 years ago
Read 2 more answers
Which variable captures the fact that a person is spontaneous or flexible? A. senses B. judgment C. perceptiveness D. feeling E.
Luba_88 [7]

C. Perceptiveness

The definition for Perceptiveness is: good at understanding things or figuring things out


6 0
3 years ago
Read 2 more answers
Best company who provides the best ISP (internet service provider)?
valina [46]

Answer:

Explanation:

all internet service providers are garbage. especially in america.

so i will focus on only the positives about one. even though  i know a bunch of bad things about this one.

AT&T is super innovative in that they are bringing fiber optic to many homes in America. Fiber optic is a new type of wiring that brings the fastest Internet never seen before, at speeds of one gigabit per second or even more. Furthermore, their technicians tend to resolve any issues with routers at home.

5 0
2 years ago
Helloooooo people, thats all I just wanted to say :D​
Salsk061 [2.6K]

Answer:

Hi also thank you for the points very much appreciated.

6 0
3 years ago
Default color html ​
Marrrta [24]

Answer:

black for font...

and

white for bg color

Explanation:

i think this is enough for ur question...

3 0
3 years ago
Other questions:
  • john wants to view sarah's assignment files on his computer. but he cannot open them because of version problems. which upgrade
    14·2 answers
  • A new company is upgrading a media workstation. The computer will be predominantly used for graphic intensive presentations, sli
    13·1 answer
  • After a worksheet has been displayed in page layout view, page breaks are indicated by ________ in normal view.
    14·1 answer
  • What is the best practice to do an SEO for a HTML website? Is there any plug-in for this?
    13·1 answer
  • In a rear-wheel drive (RWD) system, the rear axle _______ the vehicle.
    11·1 answer
  • a traditional wireless network involving access points that all have wired connections is known as a ?​
    5·1 answer
  • Match the roles to the task they perform.
    5·1 answer
  • An engineer is designing an HTML page and wants to specify a title for the browser tab to display, along with some meta data on
    12·1 answer
  • Who is the traitor of UA?<br><br>1 Karishma<br><br>2 Yuga Aoyama<br><br>3 Denki <br><br>4 Mineta
    6·1 answer
  • list three things that can spoil a printer if they are not of the correct specification and what damage may be caused​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!