form four different numbers how can i find out the minimum and maximum which can created from tem, and how can I counted how many steps need to do to get the number 6574

2 views (last 30 days)
a four-digit number in Matlab, the main thing that did not consist of the same numbers, then you need to have the program was of the digits of this number the maximum number and the minimum number (eg, 7465: Minimum-4567, the maximum-7654) and it is necessary, to programme counted how many of these steps need to do to get the number 6574
  1 Comment
Walter Roberson
Walter Roberson on 14 May 2013
Edited: Walter Roberson on 14 May 2013
Once you have found the maximum and minimum, what do you do with that pair?
Whatever you do with that pair, is it certain that you will eventually reach 6574 ?
Is it permitted to have (for example) 1333 since not all of the digits are the same?

Sign in to comment.

Answers (0)

Categories

Find more on Entering Commands in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!