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
BartSMP [9]
3 years ago
14

I need to write a program that accepts eight int values representing student test scores from the user and then displays each of

the values along with a message that indicates how far it is from the average.
Computers and Technology
1 answer:
belka [17]3 years ago
4 0
Import java.util.Scanner; /*please note that i am writing this program in a way that seems as though it is at your level of experience. I am not using arrays to initialize the integers because from the looks of it, you arent at that level yet.*/public class answerBrainly{       public static Scanner in = new Scanner(System.in);    public static int input1;    public static int input2;    public static int input3;    public static int input4;    public static int input5;    public static int input6;    public static int input7;    public static int input8;    public static void main(String[]args){        System.out.println("Please enter in your first grade: ");        input1=in.nextInt();        System.out.println("Please enter in your second grade: ");        input2=in.nextInt();        System.out.println("Please enter in your third grade: ");        input3=in.nextInt();        System.out.println("Please enter in your fourth grade: ");        input4=in.nextInt();        System.out.println("Please enter in your fifth grade: ");        input5=in.nextInt();        System.out.println("Please enter in your sixth grade: ");        input6=in.nextInt();        System.out.println("Please enter in your seventh grade: ");        input7=in.nextInt();        System.out.println("Please enter in your eighth grade: ");        input8=in.nextInt();        int average = (input1+input2+input3+input4+input5+input6+input7+input8)/8;        System.out.println("Your average is: "+average);        int input1Calc=average-input1;        int input2Calc=average-input2;        int input3Calc=average-input3;        int input4Calc=average-input4;        int input5Calc=average-input5;        int input6Calc=average-input6;        int input7Calc=average-input7;        int input8Calc=average-input8;        System.out.println("Your first grade is "+input1Calc+" points away from the average");        System.out.println("Your second grade is "+input2Calc+" points away from the average");        System.out.println("Your third grade is "+input3Calc+" points away from the average");        System.out.println("Your fourth grade is "+input4Calc+" points away from the average");        System.out.println("Your fifth grade is "+input5Calc+" points away from the average");        System.out.println("Your sixth grade is "+input6Calc+" points away from the average");        System.out.println("Your seventh grade is "+input7Calc+" points away from the average");        System.out.println("Your eighth grade is "+input8Calc+" points away from the average");  }}
You might be interested in
When listing columns in the select list, what should you use to separate the columns?
Gala2k [10]
The answer is commas.  <span>When listing columns in the select list, commas should be used to separate the columns.</span>
6 0
4 years ago
Alex works as a customer-service representative at an insurance company. Before starting his shift, Alex reviews issues from his
never [62]

Answer:

problem-solving

Explanation:

he is making sure all his problems have been resolved before starting a new shift.

4 0
3 years ago
Read 2 more answers
What is the default zoom percentage in Word?<br><br> 50%<br> 100%<br> 150%<br> 200%
Hunter-Best [27]

Answer:

its 100%

Explanation:

5 0
3 years ago
Read 2 more answers
Tricia is managing tasks that have been assigned to her. She needs to enter mileage information in relation to a
Lady bird [3.3K]

Answer:

Task

Explanation:

6 0
3 years ago
Read 2 more answers
To output age for the user which of the following you need to use?
koban [17]

Answer:

D

Explanation:

A is declaring a variable

B is getting input from the user and storing it in variable age

C is outputting the word "age" to the screen

D is outputting the word "age" to the screen and then outputting the value of the age variable immediately after which is correct.

6 0
3 years ago
Other questions:
  • What is the definition of online communication
    15·1 answer
  • .All of the following are true with the respect to implicitinvocation except:
    8·1 answer
  • 1. Create an array of ints with 20 elements. With a random number generator, seeded with time, assign a random number between 1
    8·1 answer
  • Which best describes what Pavel should do differently for the kids book?
    13·2 answers
  • Which software fits into the category of a productivity software?
    11·1 answer
  • How would you create a tint of a color?
    6·1 answer
  • Which of the following statements is true of nonroutine messages? a. They typically concern novel events. b. They are best commu
    5·1 answer
  • Which of the following statements is not true? Group of answer choices
    9·1 answer
  • Which UML relationships should be used between a subclass and a superclass? For example, suppose there is an interface or abstra
    5·1 answer
  • "last month, our sales rose when we increased prices by 15%, so we should raise our prices another 15% this month." which logica
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!