in reply to any loop ideas?

Do you have any ideas on the condition in the loop i can put?

Well, anything you like, really. You can make it loop 3 times, or infinitely (until the user aborts by pressing Ctrl+C), or until STDIN/<> has EOF, or until the user enters "get me out of here", or...

You must decide what the program should do, we can't do that for you.