Guest User

Untitled

a guest
Feb 13th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. /*
  2. * A nested for loop to print all seat combinations in a theater.
  3. * The first row-seat combination should be 0-0
  4. * The last row-seat combination will be 25-99
  5. */
  6.  
  7. // loop through the rows
  8. for (var r=0; r<26; r++){
  9.  
  10. // loop through the seats
  11. for (var s=0; s<100; s++){
  12.  
  13. // print every row-seat combination
  14. console.log(r + "-" + s);
  15. }
  16. }
Add Comment
Please, Sign In to add comment