4 ms·
For one liners, you can just surround the code in backticks a la `int counter = 0;` (i.e. type first backtick, paste in code, type the second backtick). For co
by kevindong 8y ago
For one liners, you can just surround the code in backticks a la `int counter = 0;` (i.e. type first backtick, paste in code, type the second backtick).
For code that's multiple lines long and where you don't care about syntax highlighting, you can surround the code in triple backticks a la (i.e. type first set of triple backticks, paste in code, type in second set of triple backticks):
```#include <stdio.h>
int main() {
printf("Hello world\n");
}```
For code where you want syntax highlighting, I do think you either need to drag the relevant text file into the Slack window or use the '+' button to the left of the text box.