#!/usr/bin/perl

# output type
print "Content-type: text/html\n\n";

print "SUM\tPROD\n";

while ($counter1 < 10) {

  while ($counter2 < 10) {

     while ($counter3 < 10) {

       $sum = $counter1 + $counter2 + $counter3;
       $prod = $counter1*$counter2*$counter3;

       print "$sum\t$prod\n";

      $counter3++;
    }

  $counter3 = 0;
  $counter2++;
  }
 
$counter2 = 0;
$counter1++;
}