fork(1) download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. String s = "abacuma";
  8. Console.Write(StrConv.Convert(s));
  9. }
  10. }
  11.  
  12. public class StrConv
  13. {
  14. public static String Convert(String input)
  15. {
  16. String result = "";
  17. for (int c = 0; c < input.Length; c++)
  18. {
  19. result+= input[c];
  20. if ((c+1) < input.Length && input[c] == input[c+1])
  21. {
  22. doublecount = 2;
  23. while ((j+1) < input.Length && input[j] == input[j+1])
  24. {
  25. doublecount++;
  26. }
  27. result+=doublecount;
  28. }
  29. }
  30. return result;
  31. }
  32. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(22,33): error CS0103: The name `doublecount' does not exist in the current context
prog.cs(23,41): error CS0103: The name `j' does not exist in the current context
prog.cs(25,41): error CS0103: The name `doublecount' does not exist in the current context
prog.cs(27,41): error CS0103: The name `doublecount' does not exist in the current context
Compilation failed: 4 error(s), 0 warnings
stdout
Standard output is empty