C# program to group the sequence of number

This program will group the sequence of a number from the list with (-), for this example input 1,2,3,4  the output will be 1-4. If there is no sequence of the number then it should be printed as it is, example: 1,3,10 will provide the following output 1,3,10.



Enter the number:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.