Advertisement
Guest User

Untitled

a guest
Nov 14th, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4. int main() {
  5. float sum = 0, e, next = 1 / sqrt(3);
  6. cin >> e;
  7. while (next >= e) {
  8. sum += next;
  9. next *= 1/sqrt(3);
  10. }
  11. cout << "S = " << sum << "\n";
  12. system("pause");
  13. return 0;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement