onilink_

Untitled

Dec 6th, 2019
473
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. for(int i=1; i<10; ++i)
  2. {
  3.     Float pos = 0.0;
  4.     Float force = 20.0;
  5.     Float fric = 0.1;
  6.     Float N = i;
  7.    
  8.     force *= N;
  9.     fric = 0.5 * force * force / 5000;
  10.    
  11.     while(force > 0.0)
  12.     {
  13.         pos += force;
  14.         force -= fric;
  15.     }
  16.    
  17.     std::cout << pos << std::endl;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment