Question: (Single-dimension Array) Using a single-dimension array, write a program that will allow the user to enter in twenty different numbers between 1 and 1000. The
(Single-dimension Array) Using a single-dimension array, write a program that will allow the user to enter in twenty different numbers between 1 and 1000. The requirements for the program state that a user must enter different numbers, so your program should check after each number is entered to make sure that the user has not entered that number before. If the user has not entered that number before, save it (hint: this as well as checking to ensure the number hasn't been entered before is why you need the array). If the user has entered the number before, print a message to the user informing them that they have already used that number, and ask them for a different number. After you have received 20 different numbers from the user, print them as a list and quit the program. Notes: Be sure not to terminate before you have received 20 different numbers, and be sure to ensure the user doesn't enter a number less than 1 or greater than 1000.
Programming in C language to be run on Code Blocks on Windows.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
