Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ please 1. Randomly assign integers in the range of 1-100 to a two-dimensional array. Write a program that finds the average value of the

C++ please
1. Randomly assign integers in the range of 1-100 to a two-dimensional array. Write a program that finds the average value of the rows and the average value of the columns. Display the averages.
2. Create an array of randomly generated numbers in any range. Write a function that takes the array as an argument and returns an array that consists of only the even numbers in the original array. Use the function in a program.
3. Create an array of randomly generated numbers ranging from 1 to 100. Write a function that counts the number of array elements greater than or equal to a given value and returns the count. Use the function in a program.
4. Create an array of ten values using an initializer list. Write a function that swaps adjacent values, so that an array with the elements [1,2,3,4] becomes [2,1,4,3], but for 10 elements and not just 4. Display both the original array and the new array in your program.
5. Look up the definition of median and mode. Create an array of 100 randomly generated integers. Write a function that determines the median value of the array and a function that determines the mode of the array. Use the functions in a program.

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

Databases On The Web Designing And Programming For Network Access

Authors: Patricia Ju

1st Edition

1558515100, 978-1558515109

More Books

Students also viewed these Databases questions

Question

The two lower courts found for all defendants. Why?

Answered: 1 week ago

Question

4. Whal are the key characteristics of organization development?

Answered: 1 week ago

Question

Can employees vary their hours to suit their preferences?

Answered: 1 week ago