Question: TASK 3 : Write the function input _ array which prompts the user for a list containing non - negative integers or 0 . The
TASK : Write the function inputarray which prompts the user for a list containing nonnegative integers or The user ends the list by entering a negative number or up to integers. Assume that the user will not enter more than integers Store the list of integers into the array passed in as the first input parameter. Do NOT store the negative number to end user input if that is how the user ends the list into the array. The function returns the number of nonnegative integers or values entered by the user.TASK : Write the function countkeys which computes and returns the number of occurrences of a key value in a list.TASK : Write the procedure printindices which displays the locations array indices of the key value in the list as a comma separated list delimited by Note that the last input parameter contains the number of occurrences of the key value in the list. Make sure you use this parameter in your solution.Thoroughly test your program on different input. For example, test your program when the user does not enter any valid value or just a single valid value. These are called corner or boundary cases. Use the provided test cases as well.Be sure that there is a comment documenting each variable.Be sure that your if statements, for and while loops and blocks are properly in
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
