I am a fan of just putting it in a code block as the quote seamsseems distracting for program output. II like the form of
//sampleSample code block
#include <iostream>
int main()
{
std::cout << "Hello World!";
}
Output:
Hello World!
This way the text looks like it would in the console, but I am not surrounding it with any extra markup. ToTo me this is pretty clear what the code is and what the output of that code block is.