Guest User

Untitled

a guest
Jun 21st, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. loop A: 1 to 10
  2. loop B: 1 to 5
  3. loop C: 1 to 7
  4.  
  5. for each iteration of loop A, the loop counter would increase by 35 ( 5 * 7 )
  6.  
  7. for each iteration of loop B, the loop counter would increase by 7 ( 7 * 1 )
  8.  
  9. for each iteration of loop C, the loop counter would increase by 1
  10.  
  11. if loop counter is 80
  12. 80 % 35 = 10
  13. (80 - 10) / 35 = 2 - loop A's iteration count
  14.  
  15. 10 % 7 = 3
  16. (8 - 1) / 7 = 1 - loop B's iteration count
  17.  
  18. loop C's interaction count 3 (innermost loop so mod not required)
Add Comment
Please, Sign In to add comment