SHARE
TWEET

Untitled

a guest Nov 14th, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top