Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include
- #include
- #include
- int main()
- {
- float y, s, x, eps;
- int i;
- freopen("input.txt", "r", stdin);
- freopen("output.txt", "w", stdout);
- scanf("%.2f\n%.5f", &x, &eps);
- i = 1;
- while (y >= eps)
- {
- y = x*x*x;
- y /= (2*i - 1);
- s +=y;
- y *= (2*i - 1);
- i++;
- }
- printf("%.5f", s);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment