Write a program in C++ having function sum sequence having two value parameters ‘u’ and ‘n’ with result type float .To find the sum of series given below:-
1-U+U^2/2!-U^3/3!+U^4/4!-……………………………………………………………..±U^n/n!
1
Expert's answer
2012-11-01T13:01:34-0400
#include <math.h> #include <iostream> using namespace std;
int factorial(int n) { return !n ? 1 : n * factorial(n - 1); & } int main() { double s=0,a,z,x; int u,n,i,j=0;
Comments
Leave a comment