Write a program that prompts the user to enter in an unlimited number of colors. Test to make sure that the user did not already enter a color before storing it (i.e. “We’re sorry, but you’ve already added the color ‘yellow’”). When the user types the string “exit” you should stop collecting colors. The print out the colors entered in alphabetical order.
Comments
Leave a comment