Advertisement
Guest User

Untitled

a guest
Feb 29th, 2020
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include <iostream>
  3. #include <cmath>
  4. using namespace std;
  5.  
  6. double series(double x, double N) {
  7. double S, x2 = x*x;
  8. for (int i = 0; i <= N; i++) {
  9. S = (x2 + i) / pow(x, i);
  10. }
  11. return S;
  12. }
  13.  
  14. int check() {
  15. d
  16. }
  17.  
  18.  
  19.  
  20. int main() {
  21. int r = 0;
  22. double x = 1, M;
  23. int *a = new int[5];
  24. for (int i = 5; i <= 25; i += 5) {
  25. a[r] = series(x, i);
  26. cout << a[r] << endl;
  27. r += 1;
  28. }
  29.  
  30. system("pause");
  31. return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement