SyntaxHighlighter Evolved allows you to easily post syntax-highlighted code to your site without losing its formatting or making any manual changes. It uses the SyntaxHighlighter JavaScript package by Alex Gorbatchev.
For a live demo, see this plugin’s homepage.
For a list of supported languages (most widely used languages are supported), see the WordPress.com support document.
As seen on WordPress.com.