fork(1) download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4.  
  5. namespace MaxDigitInString
  6. {
  7. class Program
  8. {
  9. static void Main(string[] args)
  10. {
  11. string s = "১१৴௧౧";
  12. List<int> lst = new List<int>();
  13.  
  14. foreach ( char c in s )
  15. {
  16. if (char.IsDigit(c)) lst.Add(c - '0');
  17. }
  18.  
  19. Console.WriteLine( "Maximum is {0}", lst.Max() );
  20. }
  21. }
  22. }
Success #stdin #stdout 0.05s 24000KB
stdin
Standard input is empty
stdout
Maximum is 3127