i have to write a program to find sum of the sequence using loops
the sequence is
x-x^2/2!+x^3/3!-x^4/4!+.....
sunveer
0
Newbie Poster
Recommended Answers
Jump to PostAnd what is the problem?
To help you a little, your sequence is the same as:
(-1)^2 * x^1/1! + (-1)^3 * x^2/2!...
Jump to PostYet another prompting:
X(1) + X(2) + ... +X(n)+...
X(1) = x
X(n) = (+/-)x*x*...n times / (1*2*...*(n-1)*n) = (-x/n) * X(n-1)
It's so simple ;)...
All 5 Replies
Sci@phy
97
Posting Whiz in Training
ArkM
1,090
Postaholic
stilllearning
148
Posting Whiz
ArkM
1,090
Postaholic
stilllearning
148
Posting Whiz
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.