Advertisement
Guest User

Untitled

a guest
Feb 26th, 2020
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. int main()
  2. {
  3. float E,x1,x2,i=2;
  4. cout << "E="; cin >> E;
  5. x1 = 2;
  6. x2 = 2.25;
  7. while (abs(x2 - x1) > E)
  8. {
  9. x1 = x2;
  10. x2 = pow((1 + 1.0 / (i + 1)),i);
  11. i++;
  12. }
  13. cout << x2;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement