Question: Assessment program to test what you learned from your assignments. Practice program 1 Write a C + + program that creates a couple of numeric
Assessment program to test what you learned from your assignments.
Practice program
Write a C program that creates a couple of numeric lists like the ones shown in the examples.
Your program must fulfill the following requirements:
You must use two arrays named myList and yourList with capacity to store up to whole numbers.
You must use a global constant variable to specify the arrays dimensions.
You must use functions to create, copy, and print the lists.
Function main:
Creates the arrays
Repeats the following steps for as long as the user wants to continue see sample run
Prompts the user to enter a multiplier
Calls the functions specified below:
A generatelist:
Receives the array corresponding to myList and the multiplier through the parameter list
Returns the array populated from the first element to the last according to the following rules:
If the current element's index is odd, its value is set to multiplier index
If the index is even, its value is set to multiplier index.
B copyList:
Receives the arrays corresponding to myList and yourList through the parameter list.
Fills yourList with the values from myList in reverse order.
C displayList:
Receives the array corresponding to yourList.
Prints the values in the array in order.
Example:
Enter multiplier:
Continueyn: y
Enter multiplier:
Continueyn: y
Enter multiplier:
Continueyn: n
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
