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]
3 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]3 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
in python i wrote a function where if the user inputs a certain word the function repeats over again, since the function aaks fo
Colt1911 [192]
Check out the counter set
4 0
2 years ago
Write a basic program that performs simple file and mathematical operations.
Ostrovityanka [42]

Answer:

Explanation:

I have written the Python program based on your requirements.

Just give the path of the input file and the path for the output file correctly where you want to place the output file.

In, my code - I have given my computer's path to the input and output file.

You just change the path correctly

My code works perfectly and I have tested the code with your inputs.

It gives the exact output that you need.

I have attached the Output that I got by running the below program.

Code:

month_list={ "january":"1","february":"2", "march":"3","april":"4", "may":"5", "june":"6","july":"7", "august":"8", "september":"9","october":"10", "november":"11", "december":"12"} input_file=open('C:\\Users\\Desktop\\inputDates.txt', 'r') output_file=open('C:\\Users\\Desktop\\parsedDates.txt','w') for each in input_file: if each!="-1": lis=each.split() if len (lis) >=3: month=lis [0] day=lis[1] year=lis [2] if month.lower() in month_list: comma=day[-1] if comma==',': day=day[:len (day)-1] month_number=month_list[month.lower()] ans-month_number+"/"+day+"/"+year output_file.write (ans) output_file.write("\n") output_file.close() input_file.close()

- O X parsedDates - Notepad File Edit Format View Help 3/1/1990 12/13/2003

- X inputDates - Notepad File Edit Format View Help March 1, 1990 April 2 1995 7/15/20 December 13, 2003 -1

cheers i hope this helped !!

7 0
4 years ago
You are building a gaming computer and you want to install a dedicated graphics card that has a fast GPU and 1GB of memory onboa
Vilka [71]

Answer:

a. PCI express

Explanation:

<em>PCI express</em> (Peripheral Component Interconnect Express) is a high speed serial bus and commonly used motherboard interface for  Graphics card, wifi, SSDs and HDs hardware connections. Simple PCI can also be used but PCI express has more error detection accuracy lesser number of I/O pins and better throughput as compared to simple PCI.

6 0
3 years ago
Pa help please I need help<br>10 points :'(<br>nonsense report:<br>1 heart​
tatuchka [14]

Answer:

√ 1. Cellphone

<h3>Product Description:</h3>

A cellphone is any portable telephone that uses cellular network technology to make and receive calls.

7 0
3 years ago
The table shows the number of points Ramon has earned on science quizzes. Quiz 16 points Quiz 2 9 points Quiz 3 1 point Quiz 4 9
kotykmax [81]

Answer:9

Explanation:d.9

6 0
3 years ago
Other questions:
  • Information management examines the organizational resource of information and regulates its definitions, uses, value, and distr
    11·1 answer
  • Yan wants to attract customers specifically searching on Google for Time-B-Gone, his company's unique office-support product. Hi
    12·1 answer
  • In JavaScript, which of the statements below can be used for string declaration?
    11·1 answer
  • What kind of information B2B SaaS companies wish to know about their competition, apart from information about their competitors
    15·1 answer
  • Which of the following code segments does not contain any errors?
    7·1 answer
  • Which of the following is an input device? (Select all that apply)
    13·1 answer
  • Which type of image format is constructed using proportional formulas rather than pixels? This task contains the radio buttons a
    12·2 answers
  • How many passes will it take to find the four in this list? 4, 5, 6, 7, 8, 9, 10 1 2 3 4
    12·2 answers
  • Which one causes concerns for institutions or businesses when they are collected stores and they aren’t secured properly?
    5·1 answer
  • In this lesson, you learned how to create reports and how to display them in a Web application. You will use the same chinook da
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!