Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Arrays are a basic data structure round in most programming languages. Tney may be called something else - but the concept of having a list
Arrays are a basic data structure round in most programming languages. Tney may be called something else - but the concept of having a list of variables known by one name that can be looped through is standard. To that end we are going to do some array practice in this programs. In this program you will be creating 2 arrays- one will have values input into it, the second will be used to store values from the first array that are divisible by X (where e ints. Part 1. The main program should have 2 arrays both set to a maximum of 20 elements. The number of elements should be set to a const for easy changing.) The purpose of part 1 is to fill the first array with values. The user will enter how many elements should be entered and then call a function to fill the array. Be sure the array won't go out of bounds. After the number of elements has been input output a newline; Once you have come back to the main program you will call a print function that will output the contents of the array - one element on each line. The input function (do NOT call this function input). The function should take an int array and number of elements that will be input as an int, and an int indicating the maximum size of the array. It will return nothing. Also, after all values have been input output a newline. The output function (do not call the function output) will accept an int array and the number of element in the array as an int. It returns nothing. Do not allow the function to change the values in the array passed in
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