Question: a java program with a scanner. Exercise #01 1. Write a program that reads a list of integer and stores the integers in an array.

 a java program with a scanner. Exercise #01 1. Write a a java program with a scanner.

Exercise #01 1. Write a program that reads a list of integer and stores the integers in an array. 2. Write a function compact that eliminates all 0's (zeroes) from its array parameter, leaving the order of the other elements unchanged. All local variables within this function must be scalar. In other words, you may not use a second array to solve the problem. // precondition: list contains integers from 0.N-1 // postcondition: all O's have been removed from list: N is reduced as appropriate. 3. Do not solve the problem by printing out only the non-zero values in the array. Function compact must remove all zeroes from the array

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!