stores the frequency of all single digit in three - digit number
int freq [ 10 ] = { 0 } ; freq [ dup % 10 ] ++ ; dup = dup / 10 ; freq [ dup % 10 ] ++ ; dup = dup / 10 ; freq [ dup % 10 ] ++ ; dup = i ;