fork download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace hello
  7. {
  8. class Program
  9. {
  10. static void Main(string[] args)
  11. {
  12. var str = "Heaveno World";
  13. for (var i = 0; i <= 666; i++)
  14. str = GodVersusSatan(str);
  15. Console.WriteLine(str);
  16. }
  17.  
  18. static string GodVersusSatan(string s)
  19. {
  20. if (s.Contains("Hell"))
  21. return God(s);
  22. else if (s.Contains("Heaven"))
  23. return Satan(s);
  24. return s;
  25. }
  26.  
  27. static string God(string s)
  28. {
  29. return s.Replace("Hell", "Heaven");
  30. }
  31.  
  32. static string Satan(string s)
  33. {
  34. return s.Replace("Heaven", "Hell");
  35. }
  36. }
  37. }
Success #stdin #stdout 0.05s 34024KB
stdin
Standard input is empty
stdout
Hello World