Tags for embedding computer code in posts

Is there a way to embed computer code in posts here that makes it look better than the double spacing format it uses. I know some forums have tags to make it happen.

1 Like

Hi @demej00 ,

You mean something like this?

sudo apt update


sudo apt upgrade

For this, you can use 3 backticks ``` on a line above and below the code block

Sorry. I don’t understand how to use sudo.

1 Like

Hi @demej00 ,

sudo command is just an example

you can put any code between 3 backticks (3 above the code and 3 below the code) and it will be shown as a code in these grey areas.

Haha, ridiculous me. Ok, thanks.

1 Like
#include <stdio.h>
int main() {
   // printf() displays the string inside quotation
   printf("You are welcome!");
   return 0;
1 Like