Question: hello I want to create the following program in python and c++ using a (function and a main) create a program that generates a 2D

hello I want to create the following program in python and c++ using a (function and a main)

  • create a program that generates a 2D Array the size the user asks for

    • you need to get rows and columns

  • using loops, randomly generate numbers between 1 and 50 and place them in the 2D-array

  • then have a function that accepts the 2D array and finds the average of all the numbers

    • remember, loop inside of a loop!

    • no using a built in average function

  • in C++ you CAN NOT change the size of the array dynamically like in Python

  • just pick a size for the row and column and assign them as constants

example:

hello I want to create the following program in python and c++

:

How many row would you like: 2 How many columns would you like: 3 0 1 2 4 5 2 The average of all the numbers is: 2.33

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!