UKHeliBob:
Is this for the purpose of learning about using tasks in a generally unsuitable environment or does the person doing the asking not know that there are other more suitable ways of meeting the requirement ?
I think it should be done in a normal loop. But it was given as homework.