Displaying Source Code(s)
|
|
To generate cos series
--------------------------------------------------------------------------------
Description : to generate cos series
# include <stdio.h>
# include <conio.h>
main()
{
int i,p,n;
clrscr();
printf("enter the number in term of series");
scanf("%d",&n);
printf("xcos(x)=1");
for(i=1;i<=n;i++)
{
p=2*i;
if(i%2==0)
printf("+");
else
printf("-");
printf(x^%d/%d!",p,p);
getch();
}
}
|
|
|