There are several ways to suitably display code in MT entries. If you do not encode your code (replace html entities) it will become the very code you're attempting to display. (out of espresso beans this morning, brain is fuzzy, sorry for the convoluted verbiage)
Rather than doing the "textarea" thing (google for more info on that), I prefer to simply run the code through a web utility that replaces the html entities so my code will display properly. I then surround my newly encoded code with blockquote tags and I'm done.
There are numerous free encoding tools on the web. My favorite (because I could install it on my own site) is SimpleCode by Dan at SimpleBits. You might also check out
