First, thanks for your reply.
Well, as I said in the first message, I'm a beginner, and this problem may seem easy to you but not for me.
This is not a homework. I will work with computacinal simulation method in problems of solid state physics. So I need to learn a programming language well...