For the given flowchart write the full C program Solutionint
For the given flowchart, write the full C program.
Solution
int main()
{
int i,j,n,factorial,x,term,cosx;
x=0.5;
n=10;
cosx=0;
i=0;
for(i=0;i<n;i++)
if(i<n)
{
j=1;
for(j=0;j<2*i;j++){
if(j<2*i)
{ factorial*=j;
j=j+1}
else{
term=(x*x)/factorial;
}
if((i%2)!=0)
{
cosx=cosx-term;
}
else
{
cosx=cosx+term;
}}
printf(comparision);
return 0 ;
}
