Answer :
987654321 is the greatest whole number that uses all the digits from 1 to 9 only at once.If the digits can be used repeatedly then the answer is infinite
The way to form the greatest number is to use the highest valued digit in the most significant digit.
If the digits are usable only once, then obviously, we place the digits 9,8,7...1 from most significant place to the units place.
Hence 98, 76, 54, 321 will be the largest number.
If each of the digits is usable 2 times, then
998877665544332211
if each of the digits are usable n times, then
99..988...877...766...655...54...433...322..211..1
If the digits are usable only once, then obviously, we place the digits 9,8,7...1 from most significant place to the units place.
Hence 98, 76, 54, 321 will be the largest number.
If each of the digits is usable 2 times, then
998877665544332211
if each of the digits are usable n times, then
99..988...877...766...655...54...433...322..211..1