#include <iostream>
#include <math.h>
using namespace std;
int main()
{
int x,i,j,n=1;
float result=0;
cout << "x = ";
cin >> x;
for (i=2;i<13;i+=2)
for (j=1;j<i+1;j++)
n *= j;
}
result += pow(x,i)/n;
n=1;
cout << "Result: " << result;
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
int x,i,j,n=1;
float result=0;
cout << "x = ";
cin >> x;
for (i=2;i<13;i+=2)
{
for (j=1;j<i+1;j++)
{
n *= j;
}
result += pow(x,i)/n;
n=1;
}
cout << "Result: " << result;
}