Hi,
What do you mean by "answer is error"? Your code gave me the same result as manual calculations with formulas.
What is the correct answer?