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
1
Answer:
good morning
Explanation:
how are you?
Answered by
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
Computer Science,
2 months ago
Social Sciences,
2 months ago
History,
2 months ago
Math,
4 months ago
Computer Science,
4 months ago
History,
10 months ago
Math,
10 months ago