Question: Write a function named controlNumber which takes a number and returns 1 if all the digits of the number are equal and 0 otherwise. Use

Write a function named controlNumber which takes a number and returns 1 if all the digits of the number are equal and 0 otherwise. Use that function in your program to find out the numbers in array A having all digits equal and not equal. Your program should produce output as given below. Define array A as given; A = [233, 45, 777, 81, 999999, 36, 90, 88, 11, 61] 233 >> not all digits are equal 45 >> not all digits are equal 777 >> all digits are equal 81 >> not all digits are equal 999999 >> all digits are equal 36 >> not all digits are equal 90 >> not all digits are equal 88 >> all digits are equal 11 >> all digits are equal 61 >> not all digits are equal
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
