First, when posting code please use code tags to make the code readable. Go Advanced, select the code and then click '#'.



double rate = .03;

3% is really 3 / 100 which is .03. So you should...