Guest User

Untitled

a guest
Nov 24th, 2017
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. string s = Console.ReadLine();
  2.  
  3. //s.Replace("+", "");
  4. string valo = string.Empty;
  5.  
  6. var c = s.ToCharArray();
  7.  
  8. Array.Sort(c);
  9.  
  10. for (int i = 0; i < c.Length; i++)
  11. {
  12. if (Char.IsDigit(c[i]))
  13. {
  14. valo += c[i];
  15. valo += "+";
  16. }
  17. }
  18. Console.WriteLine(valo.Substring(0, valo.Length - 1));
  19. }
Add Comment
Please, Sign In to add comment