Next Program Repair Shop 160

Repeated Code

   414     foreach $x(0..2) {             ##print first row
   415        print ("<td align=center>" . $squares->[0][$x] . "</td>\n");
   416     }
   417     print ("</tr><tr valign=middle>\n");
     (Repeat twice more.)

     for my $row (0..2) {
       for my $col (0..2) {
          print ("<td align=center>" . $squares->[$row][$col] . "</td>\n");
       }
       print ("</tr><tr valign=middle>\n") unless $row == 2;
     }



Next Copyright © 2002 M. J. Dominus