Write a program that inputs a string that represents a binary
number. The string can contain only 0s and 1s and no other
characters, not even spaces. Validate that the entered number meets
these requirements. If it does not, display an error message. If it
is a valid binary number, determine the number of 1s that it
contains. If it has exactly two 1s, display "Accepted". Otherwise,
display "Rejected". All input and output should be from the
console.
Examples of...