#include <stdio.h>
int main () {
int i;
i = 3;
i = i + 5;
printf("Hello %d\n", i)
}
CGI bin
https://en.wikipedia.org/wiki/Common_Gateway_Interface
Beyond the scope
#include <stdio.h>
#include <math.h>
int main() {
float j;
j = sin(M_PI / 4);
printf("%3.3f\n", j);
}
i = 3
i = i + 5
print ("Hello %d" %(i))
mod_python mod_wsgi
https://en.wikipedia.org/wiki/Mod_wsgi
Beyond the scope
import math
j = math.sin(math.pi/4)
print ("%6.3f" %(j))
i=3
i=$[$i+5]
echo "Hello $i"
CGI bin
Beyond the scope
Don't be silly
or if you must:
perl -e 'use Math::Trig;
printf("%6.3f\n", sin(pi/4));'
<?php
$i = 3;$i = $i + 5;
echo "Hello $i";
<?php
$file = basename($_SERVER['PHP_SELF']);
?>
<form method=get action=<?php echo $file; ?>>
<input type=text name='i'>
<?php
echo $_GET['i'];
<?php
$j = sin(pi()/4);
echo round($j, 3)."\n";
?>