Advertisement
Guest User

Untitled

a guest
Oct 13th, 2016
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <iostream>
  3. #include <math.h>
  4. #include <conio.h>
  5. using namespace std;
  6. int main()
  7. {
  8. int n;
  9. double a;
  10. cin >> a;
  11. cin >> n;
  12. double result = 0;
  13. for (int i = n; i = n; i++)
  14. {
  15. double temp = a;
  16. for (int j = 1; j < i; j++)
  17. {
  18. temp *= (a + j);
  19. }
  20. result += 1 / temp;
  21. }
  22. cout << result;
  23. return 0;
  24. _getch();
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement