Take a look at these codes...
Basic approach to find maximum number: extract the digits in number and sort them in descending order using any sorting algorithm.
Similarly, to find the minimum number, sort the digits in ascending order and check if there are any leading zeros. If there is any zero at first digit, replace it with first non-zero digit.
Ok so you are taking 4 ints separately. The logic is more or less same. If you want your code to be modified, i'll need to go through it first. And i assume all nos entered are between 0 to 9.
Guve me sometime.