Advertisement
Emuq

Untitled

Sep 17th, 2019
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.10 KB | None | 0 0
  1. int counter = 0;
  2. for(int i = 1; (n - i) >= 0; i++) {
  3.     counter++;
  4.     n -= i;
  5. }
  6. return counter
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement