fork download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace lab4_2
  8. {
  9. internal class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. string w = Console.ReadLine();
  14. StringBuilder w1 = new StringBuilder();
  15. StringBuilder w2 = new StringBuilder();
  16.  
  17. foreach (var x in w)
  18. {
  19. if (char.IsDigit(x))
  20. {
  21. w1.Append(x);
  22. }
  23. if (char.IsLetter(x))
  24. {
  25. w2.Insert(0, x);
  26. }
  27. }
  28. string result = w1.ToString() + w2.ToString();
  29. Console.WriteLine(result);
  30. }
  31. }
  32. }
Success #stdin #stdout 0.06s 28644KB
stdin
a=2, t=5, c=3
stdout
253cta