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
Juliette [100K]
2 years ago
15

) For a course with n students, an n X 3 array, int[][] arr, holds scores on 3 exams. Each row holds the exam scores for one stu

dent, one exam per column. Write code to get the average of cumulative exam score, over all students. For instance, if student1 scored 50,60,65 in the three exams, and student2 scored 75,85,90, then the cumulative exam score for student1 is 175 and that for student2 is 250, and the resulting average is 212.5
Computers and Technology
1 answer:
anzhelika [568]2 years ago
7 0

Answer:

Following are the code to this question:

import java.util.*;//import package  

public class Main //defining a class

{

public static void main(String[] ax)//defining main method

{

      int student[][] = {{50,60,65},{75,85,90}}; //defining double array student  

      int Row=0,Col=0;//defining integer variable

      double x;//defining double variable

      for (int a = 0; a <student.length; a++)//use for loop to holding row value

       {  

           for (int b = 0; b<student[a].length; b++)//use for loop to holding column value  

           {  

               Row += student[a][b];//add row value

               Col += student[0][b];//add column value

           }

       }

       System.out.println(x=Row/2);//dividing value and calculating average value

}

}

Output:

212.0

Explanation:

In the above code, a 2D array student is declared, that holds some value in the next step, two integer variable "Row and Col", is declared, which it uses the for loop to add value in "Row and Col", and in the next step, a double variable x is declared, that add value and calculates its average value and store its value in x variable and print its value.

You might be interested in
Your boss bought a new printer with a USB 3.0 port, and it came with a USB 3.0 cable. Your boss asks you: Will the printer work
Greeley [361]

Answer:

Yes, is should work

Explanation:

USB is widely adopted and supports both forward and backward compatibility. The USB 3.0 printer should work with the USB 2.0 computer. However, having a connection like this, the printer will only be able to work at the speeds of the computer’s USB 2.0. By default, USB is built to allow transfer speeds improvement with upgrades from previous generations while still maintaining compatibility between devices that are supported by them.

4 0
2 years ago
How do I change my username/display name
exis [7]

Answer:

.

Explanation:

you do to me on the bottom bar and once you hit that you click the pencil and change it

6 0
2 years ago
Read 2 more answers
Kate works for a film production company. One of her responsibilities includes handling the technical aspects of the camerawork
Katyanochek1 [597]

Answer:

cinematographer

Explanation:

Kate handles the technical aspects of the camerawork. The keyword is technical aspects. Therefore, she is more of a cinematographer than a camera operator. They sound like they can be interchanged, but not necessarily. The difference between the two roles is that a camera operator is more familiar with the camera equipment and is responsible for creating a plan of execution that requires technical skills. A Cinematographer, on the other hand, relies on the camera operator to film the shots. He/she is in charge of the actual shooting and is the one who decides on the aspects of how to light the scene or how the shot will be composed.

7 0
2 years ago
Write a C function (NOT A COMPLETE PROGRAM) which uses the RETURNstatement to calculate and return the total cost for purchasing
stira [4]

Answer:

int calculate_cost(int quantity) {

   double cost = 0;

   if (quantity <= 20)

       cost = quantity * 23.45;

   else if (quantity >= 21 && quantity <= 100)

       cost = quantity * 21.11;

   else if (quantity > 100)

       cost = quantity * 18.75;

   

   return cost;

}

Explanation:

Create a function called calculate_cost that takes one parameter, quantity

Initialize the cost as 0

Check the quantity using if else structure. Depending on the quantity passed, calculate the cost. For example, if the quantity is 10, the cost will be $234.5

Return the cost

3 0
3 years ago
Mary is a big fan of tropical fish. She has a few tanks of fish at home. To maintain a healthy environment for the fish, she nee
astra-53 [7]

Answer:

Answered below

Explanation:

# Program is written in Python programming language

conditioner_in_ml = 0

width = float(input("Enter width in inches: "))

height = float(input("Enter height in inches: "))

length = float (input("Enter length in inches: "))

#Calculate the volume

volume = width * length * height

#Calculate the amount of conditioner per 100 #cubic inches of volume

conditioner_in_ml = volume/ 100

print("The amount of conditioner required for $volume cubic inches is $conditioner_in_ml ml")

7 0
2 years ago
Other questions:
  • When sociologists say that it is difficult to predict all the results of social change, what are they referring to?
    5·1 answer
  • What effect can camera tilt create? Do you think this is effective? Why or why not?
    13·1 answer
  • A bug collector collects bugs every day for 5 days. Write a program that keeps a running total of the number of bugs collected d
    12·1 answer
  • In an airline reservation system, on entering the flight number, the flight schedule and the flight status are displayed. In thi
    13·2 answers
  • ________ is a dedicated device designed to manage encrypted connections established over an untrusted network such as the Intern
    12·1 answer
  • You have been handed a mysterious piece of data by an unknown person. Judging by his shifty eyes and maniacal laughter you don't
    12·1 answer
  • The true or false questions.
    13·1 answer
  • An executable file that was determined to be infected with a virus was terminated from the running processes list. However, afte
    14·1 answer
  • In a ______topology, every device has exactly two neighbors for communication purposes. A failure in any cable or device can tak
    15·2 answers
  • the tool that is used on the form to display text that the user cannot change is a. textbox b. label c. button​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!