Laitofai

Z | Cycle

Dec 10th, 2017
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.20 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     float x,m,n;
  8.     cin>>x;
  9.     n=x;
  10.     m=1;
  11.     while(n/m>0.0001){
  12.         n*=-x;
  13.         m++;
  14.     }
  15.     cout<<n/m;
  16.     return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment