Sum of cos series

To find sum of cos series for the given angle and n value

  1. /*Program to find Cos value of given angle */
  2. /*Formula cos x = 1 - x^2/2! + x^4/4! - x^6/6!+.....*/
  3.  
  4. #include <stdio.h>
  5. #include <math.h>
  6. #define PI 3.1416
  7. "\n\t\t Sum of cos series""\n\t\t*******************\n""\nEnter the value of angle and n " );
  8. scanf( "%d ", &xdeg );
  9. scanf( "%d""\n The cosine value = %f""\n The use of library function cos in value = %f""\n\n\t\t********************\n" );
  10. getch( );
  11. }