creating a calculator

Hello world!
i need help to code a programm that will find the max and min digits from a given number,then find the sum or difference of the two max and min digits
thank you
Well, you need to treat the numbers not as integers, but as strings. You can then use stringstream to convert the highest and lowest values into integers. Of course, you will need to be able to correctly parse through the string, too.
first of all i would like to thank you for the reply.
secondly,can you please give me an example
Topic archived. No new replies allowed.