Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string s = Console.ReadLine();
- //s.Replace("+", "");
- string valo = string.Empty;
- var c = s.ToCharArray();
- Array.Sort(c);
- for (int i = 0; i < c.Length; i++)
- {
- if (Char.IsDigit(c[i]))
- {
- valo += c[i];
- valo += "+";
- }
- }
- Console.WriteLine(valo.Substring(0, valo.Length - 1));
- }
Add Comment
Please, Sign In to add comment