[class.dd] Replace writeln() with write()

Replace writeln() with write() to match the expected output.