Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I understand the first two bullet points, but the last two (minimum gap and average of even numbers) I'm stuck on. The program fills a

I understand the first two bullet points, but the last two (minimum gap and average of even numbers) I'm stuck on.

image text in transcribed
The program fills a 5x4 array with 20 randomly generated two-digit positive integers so that the first 5 numbers occupy the first column, the next 5 occupy the next column and so on until the fourth column. Make sure that your code generates different random integers when the program is run each time. . Print the array where each element in a row is separated by a space and each row is on its own line. Print the minimum gap between the adjacent elements of each column. For example, if the elements in the first column of the array store 19, 18, 31, 49 and 44 the minimum gap between adjacent elements is 1. For each column in the array, print the average of even numbers. For example, if the elements in the first column of the array store 19, 18, 31, 49 and 44 the average of the even numbers is 31. [ [ swu@venus cs111]$ . /a. out 17 92 68 88 76 60 74 77 47 39 81 84 80 23 32 44 45 85 66 44 Min gap in column 0: 29 Min gap in column 1: 16 Min gap in column 2: 6 Min gap in column 3: 0 The average of even numbers in each column: 78 76 60 65

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Android 4 Application Development

Authors: Reto Meier

3rd Edition

1118223853, 9781118223857

More Books

Students also viewed these Programming questions

Question

what is wrong with this r code = myData

Answered: 1 week ago