created 2 for loops using break and continue