Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <iostream>
- #include <cmath>
- using namespace std;
- double series(double x, double N) {
- double S, x2 = x*x;
- for (int i = 0; i <= N; i++) {
- S = (x2 + i) / pow(x, i);
- }
- return S;
- }
- int check() {
- d
- }
- int main() {
- int r = 0;
- double x = 1, M;
- int *a = new int[5];
- for (int i = 5; i <= 25; i += 5) {
- a[r] = series(x, i);
- cout << a[r] << endl;
- r += 1;
- }
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement