This code approximates the cosine of an angle using a Taylor series expansion up to the x^6 term. It converts degrees to radians and prints the result with three decimal places.
- The Taylor series approximation uses only a few terms, but the factorial denominators (2, 24, 720) are hardcoded. Check if the factorial values are correct for the terms you intend to include.
- The series expansion for cosine is an alternating series. Verify the signs of each term: the pattern should be +, -, +, -, ... starting with the first term (1).