Created
April 1, 2016 16:17
-
-
Save andrewgilmartin/6174bb3fe807084a15bc1646859412a9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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