0

I have trouble embedding a list of C++ code in my html. The web doesn't print out the <iostream> part and i think that my compiler might've executed that part.

                     <code>
                        #include <iostream>
                            using namespace std;
                            
                            int main() {
                            cout << "Hello World!";
                            return 0;
                            } 
                    </code>

The result looks like this:

                        #include 
                            using namespace std;
                            
                            int main() {
                            cout << "Hello World!";
                            return 0;
                            } 
                    

How do i make sure that the <iostream> actually shows up

1 Answers1

0
                 <code><pre><xmp>
                    #include <iostream></xmp>
                        using namespace std;
                        
                        int main() {
                        cout << "Hello World!";
                        return 0;
                        } 
                    </pre></code>

not sure if I used the tag correctly but it works just fine for me.

Here's the solved product:

                    #include <iostream>

                        using namespace std;
                        
                        int main() {
                        cout << "Hello World!";
                        return 0;
                        }