Computer Science, asked by Prabhath2002, 5 months ago

2. Given a number N, find the largest number that you can form with its digits. You are allowed to rearrange the digits in any way you wish as long as the resultant number does not contain any leading zeroes. Input Format Only one line of input with number N. Output Format Output one number, which is the largest possible number that can be formed with the digits of N. Sample Input 0 5318008 Sample Output 0 8853100

Answers

Answered by kidpratham
1

Answer:

good morning

Explanation:

how are you?

Answered by marellahemanth888
0

Answer:

largest number reversed

Explanation:

int largestNumber = 0;

for (int i = 9; i >= 0; i--) {

 for (int j = 0; j < times[i]; j++) {

   largestNumber = largestNumber * 10 + i;

 }

}

return largestNumber;

Similar questions