answersLogoWhite

0


Best Answer

#include<stdio.h>

#include<math.h>

void main()

{

float pow = 2.0, nr, dr = 1.0, x1, sum;

int i = 1,n,s = -1,x;

clrscr();

printf("\n\n\t ENTER THE ANGLE...: ");

scanf("%d", &x);

x1 = 3.142 * (x / 180.0);

sum = 1.0;

nr = x1*x1;

printf("\n\t ENTER THE NUMBER OF TERMS...: ");

scanf("%d",&n);

while(i<=n)

{

dr = dr * pow * (pow - 1.0);

sum = sum + (nr / (dr * s));

s = s * (-1);

pow = pow + 2.0;

nr = nr * x1 * x1;

i++;

}

printf("\n\t THE SUM OF THE COS SERIES IS..: %0.3f", sum);

getch();

}

User Avatar

Wiki User

βˆ™ 2008-12-02 06:12:53
This answer is:
User Avatar
Study guides

Data Science

➑️
See all cards
4.29
β˜†β˜…β˜†β˜…β˜†β˜…β˜†β˜…β˜†β˜…
7 Reviews

Add your answer:

Earn +20 pts
Q: C program to find sum of cosine series?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write a program to find the sum of sine series?

Writing a program for a sum of sine series requires a rather long formula. That formula is: #include #include #include main() { int i,n,x; .


What is the assembly program to generate a geometric series and compute its sum The inputs are the base root and the length of the series The outputs are the series elements and their sum?

What is the assembly program to generate a geometric series and compute its sum The inputs are the base root and the length of the series The outputs are the series elements and their sum?


How do you find the sum of nos in a series?

It depends on the series.


Write a program to genarate Fibonacci series upto sum numbers?

Where are the numbers that you want to sum.


What is the Program to find sum of natural number using recursion?

The sum of the natural numbers cannot be found by any method, iterative or not, as the series is infinitely long. Please restate the question.


How do you write an assembly language program to find the sum of n numbers using array?

write an assembly language program to find sum of N numbers


Write a program to find the sum of all positive number and terminate the program when sum exceed 999?

int sum = 0; int n = 0; while( sum &lt;= 999 ) { sum += (++n); }


If two integers have the same sign what is the sine of their sum?

Sine(A+ B) = Sine(A)*Cosine(B) + Cosine(A)*Sine(B).


How do you find the nth partial sum?

The Nth partial sum is the sum of the first n terms in an infinite series.


Writes a c program to find the sum of all integers between 1 and n?

Write a program to find the number and sum of all integers from 100 to 300 that are divisible by 11


Write programme for sum of number given?

write a program to find the sum of squares up to 50


Java program to find sum on even numbers from 12-45?

sum = 0; for (int i = 12; i

People also asked