home *** CD-ROM | disk | FTP | other *** search
- #!/bin/perl
-
- require "cgi-lib.pl";
-
- print &PrintHeader;
-
- if (&ReadParse(*input))
- {
- $c = int(($input{'a'}*$input{'b'})/$input{'round'})*$input{'round'};
- print '<html>';
- print $input{'a'},' times ',$input{'b'},' = ',$c;
- print '</html>';}
- else {
- print <<EOF
- <html>
- <form method="post" action="/cgi-bin/nik/multiply.pl">
- Please type in the two number which you want to multiply.<p>
- <input name="a"> <p>
- <input name="b"> <p>
- Round down to
- <SELECT NAME="round"><OPTION SELECTED> 1
- <OPTION> 10 <OPTION> 100 </SELECT><p>
- <input type="submit">
- </form> </html>
- EOF
- ; }
-
-