Last active
May 28, 2017 01:35
-
-
Save MarceloBonifazio/9f62e1478fc114b2c24663f2e27a2211 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
<?php | |
$numero = rand(1,20); // Entre com seu numero aqui | |
?> | |
<table border=1> | |
<tr> | |
<th> | |
Decimal | |
</th> | |
<th> | |
Hexadecimal | |
</th> | |
<th> | |
Octal | |
</th> | |
<th> | |
Binary | |
</th> | |
</tr> | |
<script> | |
var content = "" | |
for (var i = 0; i <= <?= $numero ?> ; i++) { | |
content += "<TR>" | |
content += "<TD>" + i.toString(10) + "</TD>" | |
content += "<TD>" + i.toString(16) + "</TD>" | |
content += "<TD>" + i.toString(8) + "</TD>" | |
content += "<TD>" + i.toString(2) + "</TD></TR>" | |
} | |
document.write(content) | |
</script> | |
</table> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment