Hi everyone. I have a question to ask if it's possible.
I have a set of numbers with decimal points. I have to sort them in ascending order, then remove the "gaps" in the decimal points.
For example, in the sorted section, we have a "gap" between 1.02 and 1.04. I need to change the 1.04 to 1.03 so there is no skipping. Similarly, 1.13 then becomes 1.04.
The "main numbers" (ones and tens etc) cannot be changed - only the decimal section. How can I go about doing this?
Thanks in advance.
I have a set of numbers with decimal points. I have to sort them in ascending order, then remove the "gaps" in the decimal points.
Original | Sorted in ascending order | Modified |
1.13 | 1.01 | 1.01 |
1.02 | 1.02 | 1.02 |
1.04 | 1.04 | 1.03 |
1.01 | 1.13 | 1.04 |
2.13 | 2.01 | 2.01 |
2.02 | 2.02 | 2.02 |
2.04 | 2.04 | 2.03 |
2.01 | 2.13 | 2.04 |
For example, in the sorted section, we have a "gap" between 1.02 and 1.04. I need to change the 1.04 to 1.03 so there is no skipping. Similarly, 1.13 then becomes 1.04.
The "main numbers" (ones and tens etc) cannot be changed - only the decimal section. How can I go about doing this?
Thanks in advance.