Soluzione brutale...

document.writeln("<pre>"+num+" = "+a+" + "+b+" + "+c+"</pre>");

ciao