fork download
  1. public class Test {
  2. public static void Main() {
  3. var text = "aaaaaaaaaa\"aaaaaaaaaaaaaaaaa\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\naaaaa\"aaaaaaaaaa\"aaaaaaaaaaaaa";
  4. var open = false;
  5. System.Text.StringBuilder newText = new();
  6. foreach (var character in text) {
  7. if (character == '"' || (open && character == '\n')) {
  8. open = !open;
  9. newText.Append(character);
  10. } else newText.Append(open ? 'b' : character);
  11. }
  12. System.Console.WriteLine(newText);
  13. }
  14. }
  15.  
  16. //https://pt.stackoverflow.com/q/69376/101
Compilation error #stdin compilation error #stdout 0.03s 24288KB
stdin
Standard input is empty
compilation info
prog.cs(5,42): error CS1525: Unexpected symbol `)', expecting `(' or `type'
prog.cs(10,30): error CS1525: Unexpected symbol `?'
Compilation failed: 2 error(s), 0 warnings
stdout
Standard output is empty