fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. string str = "20.222";
  8.  
  9. Console.WriteLine(str);
  10. int index = str.IndexOf('.');
  11. if (index > -1)
  12. {
  13. Console.WriteLine(index);
  14. Console.WriteLine(str.Length-1);
  15. char[] ch = str.ToCharArray(index + 1, str.Length - index -1);
  16. foreach(char c in ch)
  17. {
  18. Console.WriteLine(c);
  19. }
  20. }
  21. }
  22. }
Success #stdin #stdout 0.03s 33920KB
stdin
Standard input is empty
stdout
20.222
2
5
2
2
2