Showing posts with label cube a number in perl cgi. Show all posts
Showing posts with label cube a number in perl cgi. Show all posts

Saturday, August 6, 2016

Cube a Number in Perl

A simple program that I wrote using Perl CGI to display a number and its cube equivalent in the web page of the web browser.

Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.



Sample Program Output

Program Listing

cube.pl

#!"C:\xampp\perl\bin\perl.exe"

print "Content-type:text/html\n\n";
print "<body style='font-family:verdana'>";
print "<font color='blue'>";
print "Cube a Number in Perl";
print "<br><br>";
print "Written By Mr. Jake R. Pomperada, MAED-IT";
print "<br><br>";

print "<table border='1'>";
print "<tr><td>Number</td> <td> Cube Equivaelnt</td>";
for ($i=1; $i <= 10; $i++) {
print "<tr><td>$i</td>";
print "<td>" ,$i ** 3,"</td> </tr>";

}
print "</table>";
print "</body> </font>";