Enhancing Large Language Models in Coding Through Multi-Perspective Self-Consistency