Saturday, August 6, 2016

Positive and Negative Number in Perl

A simple program that I wrote using Perl CGI to display positive number and negative number 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

negative.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 "Positive and Negative 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>Positive Number</td> <td> Negative Number</td>";
for ($i=1; $i <= 15; $i++) {
print "<tr><td>$i</td>";
print "<td>" ,-$i,"</td> </tr>";

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




No comments:

Post a Comment