Answered step by step
Verified Expert Solution
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
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