Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Learning outcome: assess student s ability to: Create a 2 D array in a program. Access data in a 2 D array. Define functions with
Learning outcome: assess students ability to:
Create a D array in a program.
Access data in a D array.
Define functions with the application of D array.
Generate and use random numbers.
Activity description: sum of all numbers that are multiple of three in each COLUMN of a by matrix D array
Create a program that will sum all numbers that are multiple of three in each COLUMN of a dimension array. The program will:
Set the size of an array as a global constant variable with value of
define function numbersrandom Function numbersrandom is used to randomly generate a value between and and return the value as an integer.
Define function populatenumbers Function populate numbers is used to populate the by matrix. It means that each cell of the rows and columns will be populated with one random number. This random number is obtained by using function numbersrandom
define function printnumber Function printnumber is used to print the value in each cell of the by array.
define function summultcol Function summultcol is used to sum all numbers that are multiple of in each COLUMN of a by array.
Define function promptsummultcol The function is used to print the result of the sums as:
Sum all numbers that are multiple of three in column
Sum all numbers that are multiple of three in column
Sum all numbers that are multiple of three in column
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started