This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I think the 'C' function to calculate area is flawed. You should go back to the site you obtained it from and make sure you have copied it correctly. Pay particular attention to the signs of the terms.