#!/bin/perl --
print "Content-Type: text/html\n\n";
print "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"
\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">
<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"fi\" lang=\"fi\">
  <head><meta http-equiv=\"Content-Type\" content=\"text/html;
charset=ISO-8859-1\"/> 
    <title>kertotaulu</title>
  </head>
 <body>";


  print "<table border=\"1\" cellspacing=\"2\" cellpadding=\"2\"><tbody>";

    for(my $i=0;$i<=10;$i++){
    SISA:
        for(my $j=0;$j<=10;$j++){
            if($i==0 && $j==0){
               print "<tr><td></td>";
               next SISA;
               }
            if($i==0){
               print"<td><b>", $j ,"</b></td>";
               if($j==10){
                 print"</tr>"} 
               next SISA;
               }
            if($j==0){
               print"<tr><td><b>", $i,"</b></td>";
               next SISA;
               }
            
            print"<td>", $i*$j, "</td>";

            if($j==10){
            print"</tr>";}
         }
     }
     print"</tbody></table>";

print"</body></html>";
