![Mattixwillard](/avatars/32334.jpg)
Mattixwillard
17.05.2021 •
Mathematics
Should i get the whole akatsuki set or nah
Solved
Show answers
More tips
- F Food and Cooking Apple Cider Vinegar: The Ultimate Health and Beauty Solution...
- C Computers and Internet Е-head: How it Simplifies Life for Users?...
- F Family and Home How to Choose the Best Diapers for Your Baby?...
- F Family and Home Parquet or laminate, which is better?...
- L Leisure and Entertainment How to Properly Wind Fishing Line onto a Reel?...
- L Leisure and Entertainment How to Make a Paper Boat in Simple Steps...
- T Travel and tourism Maldives Adventures: What is the Best Season to Visit the Luxurious Beaches?...
- H Health and Medicine Kinesiology: What is it and How Does it Work?...
- O Other How to Choose the Best Answer to Your Question on The Grand Question ?...
- L Leisure and Entertainment History of International Women s Day: When Did the Celebration of March 8th Begin?...
Answers on questions: Mathematics
- M Mathematics Which of the relations has a domain of {-5,0,5}?...
- M Mathematics Which term is a term in this expression? A. x+4 B. -7 C. -3 D. -3x...
- M Mathematics Write (-4 + 2i) + (5 - 6i) as a complex number in standard form. a. 9 + 8i b. -9 - 8i c. -1 + 4i d. 1 - 4i...
- M Mathematics In y = - 3 cos (x) - 6, what is the value for y when x is 0?...
- M Mathematics What is the correct formula for the sequence 1,2,4,8...
- M Mathematics Which are diagonals through the interior of the cube? Select all the apply....
- M Mathematics If m∠ACF = (a + 20)°, and m∠AGF = (2a + 10)°, find m∠AGF. A. 150° B. 170° C. 20° D. 30°...
- M Mathematics Tim lost 1/8 of his marbles. If he had 56 marbles, how many did he lose?...
- M Mathematics What is the opposite of 9.2 (and don t delete my question!)...
- M Mathematics Which number when rounded to the nearest hundredth is 37.62? A.37.618B.37.627C.37.626D.37.612...
Ответ:
Ответ:
the akatsuki r so cool
Ответ:
Explanation:
The following code is written in Java and creates the two methods as requested each returning the desired double[] array with the averages. Both have been tested as seen in the example below and output the correct output as per the example in the question. they simply need to be added to whatever code you want.
public static double[] rowAvg(int[][] array) {
double result[] = new double[array.length];
for (int x = 0; x < array.length; x++) {
double average = 0;
for (int y = 0; y < array[x].length; y++) {
average += array[x][y];
}
average = average / array[x].length;
result[x] = average;
}
return result;
}
public static double[] colAvg(int[][] array) {
double result[] = new double[array[0].length];
for (int x = 0; x < array[x].length; x++) {
double average = 0;
for (int y = 0; y < array.length; y++) {
average += array[y][x];
}
average = average / array.length;
result[x] = average;
}
return result;
}