Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main()
- {
- int n = 5;
- float x = 2.0f;
- double sum = 1;
- long long fact = 1;
- for (int i = 2; i <= 2*n; i+=2)
- {
- for (int j = i-1; j <= i; ++j)
- {
- fact *= j;
- }
- cout << fact << '\n';
- sum += pow(x, i) / fact;
- }
- cout << sum << '\n';
- cout << endl;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement