Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
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
0
Please
log in
to post a comment.
ARM
xyz
Interface referance variable
a.i. neural framework / J.A.R.V.I.S. / Just A Rather Very Intelligent System
Overloading
line 1 syntax error
My wall
bla bla
Array Foreach with sum
Test
Please log in to post a comment.