1) Please use code tags around your code either with [code][/code] or press the <>.
2) What are you trying to do?
3) What is your question?
4) What do you need help with?
5) Why are your variable names non-descriptive.
6) Why are you using c++ things like iostream then using printf to print to the output? You should be using cout
7) Why are you using complex instead of just normal doubles?
8) Why is this in general programming instead of beginner?