I recently asked the hypothetical question of "How can you create a while loop using only if statements?" which seems to be specific enough for a title. I did make the mistake of not providing enough context, so I edited the answer and added it. Luckily, got an answer that solved the problem I was facing. However, that is not the issue nor the reason why I am asking this question. One well-respected user claimed that my question was a homework question when it was not and suggested I read the How do I ask a question.
I looked for the question and I did not find it. I did some research and I did not find the specific answer I needed.
I am pretty sure the title was descriptive enough.
I introduced the problem (after the edit).
Now, I think that is good enough for a question on SO. So what do I have to do when the situation mentioned in the title arrives?
I really don't think I handled that well and given that the user who said it has been on SO longer than I have, I think it is pretty safe to assume that it was all my mistake. So, what do I do when this happens and can I improve the quality of my questions to avoid it in the future?
while
with constraints in the question. The fact that "use recursion" helped Armando and they accepted the answer does not mean that it is possible to implement iteration without jumps and recursion.