Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
String Factorial Sorter
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { //Orders in every possible way a giver string sequence public class Program { public static void Main(string[] args) { String wordSequence = "1902"; List<char> digitchar = new List<char>{}; int counter = 0; int sort = 0; String orderedsequence = ""; foreach(char c in wordSequence) { digitchar.Add(c); Console.WriteLine(c); counter = counter +1; } do{ for(int c = sort; c<counter;c++ ) { Console.WriteLine(digitchar[c]); orderedsequence = orderedsequence + digitchar[c]; } sort=sort +1; Console.WriteLine(orderedsequence); orderedsequence = ""; } while(sort<counter); } } }
run
|
edit
|
history
|
help
1
custom Queue Implementation
Tarkov Time
Капча
Ok
DateTime Subtract TotalDays
Four Digit Number
currency change
Fórum ➡ Building a List<> with questions and answers, from data in TXT file, using LINQ ♦
Exp Regular
Just tries to add/remove items to the list