daily pastebin goal
60%
SHARE
TWEET

Untitled

a guest Nov 24th, 2017 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
Top