Discover answers to your most pressing questions at Westonci.ca, the ultimate Q&A platform that connects you with expert solutions. Discover reliable solutions to your questions from a wide network of experts on our comprehensive Q&A platform. Get precise and detailed answers to your questions from a knowledgeable community of experts on our Q&A 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.