Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a C++ program that uses a 2D array to store a set of random numbers into 7 by 5 dimensional array. The numbers that

Write a C++ program that uses a 2D array to store a set of random numbers into 7 by 5 dimensional array. The numbers that are stored in the array must be between 1 and 100. Use random number generator in order to generate the random numbers . The program then outputs the numbers , sum , smallest , largest , average , prime of the numbers , and the sorted array

In main : Define the 7 x 5 array. Pass the array to each of the following functions : 1. Populating the array with random numbers 2. Displaying the array , sum , average , smallest , largest , even , and odd numbers 3. Find and display all prime numbers in the array 4. Sort and display the sorted array.

Variable names : Must be meaningful. The initial letter should be lowercase, following words should be capitalized, no other caps or punctuation ( i.e. weightInPounds ). Each variable must be declared on a separate line with a descriptive comment.

Named constants : Use for most numeric literals. All capitals with underscores ( i.e. CAL_STATE_SALES_TAX ) Should occur at top of function, or global (only if necessary)

Rules : 1. You must use the appropriate libraries in writing this program. However, you are not allowed to use the sort library. 2. Must used at least 4 functions ( function prototypes and definitions ). 3. Not allowed to use global Arrays , global variables , vector arrays . 6. Must properly format the output as it is shown on the sample run below.

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_2

Step: 3

blur-text-image_3

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

Pro Oracle Fusion Applications Installation And Administration

Authors: Tushar Thakker

1st Edition

1484209834, 9781484209837

More Books

Students also viewed these Databases questions

Question

What is a growth firms?

Answered: 1 week ago

Question

Why does sin 2x + cos2x =1 ?

Answered: 1 week ago

Question

What are DNA and RNA and what is the difference between them?

Answered: 1 week ago

Question

Why do living creatures die? Can it be proved that they are reborn?

Answered: 1 week ago

Question

=+3. What is parallel construction, and why is it important? [LO-2]

Answered: 1 week ago