Skip to content

Instantly share code, notes, and snippets.

@andrewgilmartin
Created April 1, 2016 16:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewgilmartin/6174bb3fe807084a15bc1646859412a9 to your computer and use it in GitHub Desktop.
Save andrewgilmartin/6174bb3fe807084a15bc1646859412a9 to your computer and use it in GitHub Desktop.
#!/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