Sample Output #1: Please enter the number of rows: 3 Please enter the number of columns: 2 I have 3 rows and 2 columns. I need to fill-up 6 spaces. The 3x2 array: 1|2| 314| 5|6| The sum of all the numbers in the 3x2 array: 21 The average of all the numbers in the 3x2 array: 3.5 Sample Output #2: Please enter the number of rows: 4 Please enter the number of columns: 4 I have 4 rows and 4 columns. I need to fill-up 16 spaces. The 4x4 array: 1|2|3|4|| 5|6|7|8|| 9|10|11|12| 13|14|15|16| The sum of all the numbers in the 4x4 array: 136 The average of all the numbers in the 4x4 array: 85

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter9: Using Classes And Objects
Section: Chapter Questions
Problem 1CP: In previous chapters, you have created programs for the Greenville Idol competition. Now create a...
icon
Related questions
Question
Sample Output #1:
Please enter the number of rows: 3
Please enter the number of columns: 2
I have 3 rows and 2 columns. I need to fill-up 6 spaces.
The 3x2 array:
1|2|
314|
5|6|
The sum of all the numbers in the 3x2 array: 21
The average of all the numbers in the 3x2 array: 3.5
Sample Output #2:
Please enter the number of rows: 4
Please enter the number of columns: 4
I have 4 rows and 4 columns. I need to fill-up 16 spaces.
The 4x4 array:
1|2|3|4|
5|6|7|8|
9|10|11|12||
13|14|15|16|
The sum of all the numbers in the 4x4 array: 136
The average of all the numbers in the 4x4 array: 8.5
Transcribed Image Text:Sample Output #1: Please enter the number of rows: 3 Please enter the number of columns: 2 I have 3 rows and 2 columns. I need to fill-up 6 spaces. The 3x2 array: 1|2| 314| 5|6| The sum of all the numbers in the 3x2 array: 21 The average of all the numbers in the 3x2 array: 3.5 Sample Output #2: Please enter the number of rows: 4 Please enter the number of columns: 4 I have 4 rows and 4 columns. I need to fill-up 16 spaces. The 4x4 array: 1|2|3|4| 5|6|7|8| 9|10|11|12|| 13|14|15|16| The sum of all the numbers in the 4x4 array: 136 The average of all the numbers in the 4x4 array: 8.5
Lab9B: Lab9A, but now with more math
For this exercise you will be writing a program that will be building upon the previous program. So please
make a new class file, copy, and rename the code you have already written for Lab9A. Please also
remember to rename the file and (and in the case of Java and C# students) class name to
Lab9B.
For this exercise, please calculate two values from all of the numbers in the two dimensional array. The first
value should be the sum of all numbers in the array. This should be stored in a separate "int" variable that is
created outside the nested FOR loops. The second value should be the total average of all numbers in the
Array. This should be stored in a separate "float" variable, also outside the nested FOR loop structure.
So, in short:
• Display the sum of the values in the array
• Then display the average of the values in the array
Please refer to the sample output below for visualization and match its style.
As always:
Remember, the class name should be Lab9B.
The user input is indicated in bold.
Transcribed Image Text:Lab9B: Lab9A, but now with more math For this exercise you will be writing a program that will be building upon the previous program. So please make a new class file, copy, and rename the code you have already written for Lab9A. Please also remember to rename the file and (and in the case of Java and C# students) class name to Lab9B. For this exercise, please calculate two values from all of the numbers in the two dimensional array. The first value should be the sum of all numbers in the array. This should be stored in a separate "int" variable that is created outside the nested FOR loops. The second value should be the total average of all numbers in the Array. This should be stored in a separate "float" variable, also outside the nested FOR loop structure. So, in short: • Display the sum of the values in the array • Then display the average of the values in the array Please refer to the sample output below for visualization and match its style. As always: Remember, the class name should be Lab9B. The user input is indicated in bold.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT