Code Layout Samples

The website supports more than 100 languages. This example is in C++. All you have to do is wrap your code in markdown code tags:

```c++
code code code
```
int main(int argc, char const \*argv[])
{
    string myString;

    cout << "input a string: ";
    getline(cin, myString);
    int length = myString.length();

    char charArray = new char * [length];

    charArray = myString;
    for(int i = 0; i < length; ++i){
        cout << charArray[i] << " ";
    }

    return 0;
}
1. We can put fenced code blocks inside nested bullets, too.

   1. Like this:

      ```c
      printf("Hello, World!");
      ```

   2. The key is to indent your fenced block in the same line as the first character of the line.

Which displays:

  1. We can put fenced code blocks inside nested bullets, too.

    1. Like this:

      printf("Hello, World!");
      
    2. The key is to indent your fenced block in the same line as the first character of the line.