Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/usr/bin/perl
print "<table>";
print "<tr>";
print "<th></th>";
for ( $u = 1; $u < 7; $u +=1 ) {
print "<th>$u</th>";
}
print "</tr>";
for ( $t = 1; $t < 7; $t += 1 ) {
print "<tr><th>$t</th>";
for ( $u = 1; $u < 7; $u +=1 ) {
print "<td>";
$v = ( $t - 1 ) * 6 + ( $u - 1 );
$p = round( $v / 35 * 99 + 1 );
print $p;
print "</td>";
}
print "</tr>";
}
print "</table>";
print "\n\n\n";
print "<table>";
sub round {
return int( $_[0] + 0.5 );
}
# END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.