Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void floors() {
- int n, k = 1, count = 0;
- cin >> n;
- for (int i = 0; i < n; i++) {
- if (k + count == i) {
- count++;
- k = i;
- }
- }
- cout << count;
- }
- int main() {
- floors();
- system("PAUSE");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement