fork download
  1. using System;
  2. using System.Text;
  3.  
  4. namespace Program
  5. {
  6. class ProgramOne
  7. {
  8. public static void Main()
  9. {
  10. string str = " aa bb",s;
  11.  
  12. foreach(char c in str)
  13. {
  14. Console.WriteLine(c);
  15. }
  16.  
  17. for(int i=0;i<str.Length;i++)
  18. {
  19. if(str[i].Equals('a'))
  20. {
  21. Console.WriteLine("Replacing");
  22. str=str.Replace("a","xxxx");
  23.  
  24. }
  25.  
  26. Console.WriteLine(str);
  27.  
  28. }
  29.  
  30.  
  31.  
  32. }
  33. }
  34. }
  35.  
Success #stdin #stdout 0.03s 36952KB
stdin
Standard input is empty
stdout
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a
a
 
b
b
              aa bb
              aa bb
              aa bb
              aa bb
              aa bb
              aa bb
              aa bb
              aa bb
              aa bb
              aa bb
              aa bb
              aa bb
              aa bb
              aa bb
Replacing
              xxxxxxxx bb
              xxxxxxxx bb
              xxxxxxxx bb
              xxxxxxxx bb
              xxxxxxxx bb
              xxxxxxxx bb
              xxxxxxxx bb
              xxxxxxxx bb
              xxxxxxxx bb
              xxxxxxxx bb
              xxxxxxxx bb