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

Replace writeln() with write() to match the expected output.
Merge pull request #568 from behnam/patch-1

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