Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- int main() {
- float sum = 0, e, next = 1 / sqrt(3);
- cin >> e;
- while (next >= e) {
- sum += next;
- next *= 1/sqrt(3);
- }
- cout << "S = " << sum << "\n";
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement