Find the best answers to your questions at Westonci.ca, where experts and enthusiasts provide accurate, reliable information. Get precise and detailed answers to your questions from a knowledgeable community of experts on our Q&A platform. Experience the convenience of finding accurate answers to your questions from knowledgeable experts on our platform.

An array is called vanilla if all its elements are made up of the same digit. For example {1, 1,
11, 1111, 1111111} is a vanilla array because all its elements use only the digit 1.
However, the array {11, 101, 1111, 11111} is not a vanilla array because its elements
use the digits 0 and 1.
Write a program that reads a string from a user that represent array and check if its a vanilla
array. Otherwise it will print message as in the sample run shown below and should continue to
allow the user to enter values. The program will terminate only if the user press the "Enter" key
without entering any value. For example the '{1}' is a vanilla array since all elements use the
same digit. Where '{11, 22, 13, 34, 125}' array is not vanilla array becuase elements used 5
different digits.