You are given two non negative integers A and B . How will you find the number of heavy integers in the interval [ A,B ] ( A , B inclusive).
A non-negative integer is called heavy if the average value of its digits in decimal representation is greater than 7 . Example : 9868 is a heavy integer since the average of its digit is (9+8+6+8) = 7.75 . public static int[] findHeavyInteger(int a, int b){ |