If you want to add lines of code in your blog entry, you will need to use shortcodes, such as:
your code here
The list of supported language can be seen at http://en.support.wordpress.com/code/posting-source-code/
If you are hosted on wordpress.org, then it’s fine, but if you are selfhosted this shortcodes won’t work until you download this plugin which is used on the wordpress.com site.
I hope this will help you to write well formated posts.