manytimes-3

Untitled

Nov 5th, 2018
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.38 KB | None | 0 0
  1. <?php
  2.  
  3. $lastSector = readline();
  4. $rowsFirstSector = intval(readline());
  5. $oddSeats = intval(readline());
  6.  
  7. for ($firstSector = 'A'; $firstSector <= $lastSector; $firstSector++) {
  8.     for ($rows = 1; $rows <= $rowsFirstSector; $rows++) {
  9.         for ($seats = 1; $seats <= $oddSeats; $seats++) {
  10.             print $firstSector . "" . $rows . "" . $seats . PHP_EOL;
  11.         }
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment