Skip to main content
Copy edited.
Source Link
Peter Mortensen
  • 31.6k
  • 4
  • 22
  • 14

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.

I am a fan of just putting it in a code block as the quote seams distracting for program output. I like the form of

//sample 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. To me this is pretty clear what the code is and what the output of that code block is.

I am a fan of just putting it in a code block as the quote seems distracting for program output. I like the form of

//Sample 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. To me this is pretty clear what the code is and what the output of that code block is.

Source Link
NathanOliver
  • 179.4k
  • 8
  • 109
  • 145

I am a fan of just putting it in a code block as the quote seams distracting for program output. I like the form of

//sample 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. To me this is pretty clear what the code is and what the output of that code block is.