We know that a number is divisible by 3 if the sum of all digits is divisible by 3.
Therefore, Smallest digit: 0
So, the number formed is 476502.
Sum of the digits = 4 + 7 + 6 + 5 + 0 + 2 = 24 [24 is divisible by 3]
Also, Largest digit: 9
So, the number formed is 476592.
Sum of the digits = = 4 + 7 + 6 + 5 + 9 + 2 = 33 [33 is divisible by 3]