# Thread: one problem in C

1. ## one problem in C

Determine the largest number that can be formed with all the figures given number.
In my opinion you take the number, it becomes a vector of numbers, sort the array and turn back vector of digits in number.
I think that is a way. OK, but how to do this (it becomes a vector of numbers) ?

2. ## one problem in C

completion

for instance : the number is 62476
the highest number is 76642

3. Is this related to http://cboard.cprogramming.com/c-pro...problem-c.html? Keep related posts in the same thread.

And why would you start two threads for this?

5. Yes, that is one way to do it. Look into the % (modulus) operator for separating the digits. Keep them in an array of ints.

If you want more help than that, try working out a solution by hand (including testing some examples), then code it up. Post your attempt in code tags and ask specific questions.

7. While the number is greater than zero, use % modulus 10 to determine the right most digit. Save that to your int array[i]. Divide the number by 10, and increment i.

To print out your number, you'll need to go backward, digit by digit, from numberArray[i] to numberArray[0]. While(i) is a simple way to start that second while loop.