<html><body>

<?
if(!isset($num)) $num=20;
if(!isset(
$max)) $max=200;
?>

<form action=rendezo_form.php method=post>
num: <input type=text name=num value=<? echo $num; ?>><br>
max: <input type=text name=max value=<? echo $max; ?>><br>
<input type=submit value="Rendezz!">
</form>

<table border=1 cellpadding=10><tr><td>
<font size=1><strong>
<?
for($i=0;$i<$num;$i++) {
    
$szamok[$i]=rand(0,$max);
    echo
$szamok[$i]."<BR>";
}
?>
<strong></font>
</td><td>
<font size=1><strong>
<?
for($i=sizeof($szamok)-1;$i>=0;$i--) {
    for(
$j=0;$j<=$i-1;$j++) {
        if(
$szamok[$j]>$szamok[$j+1]) { //csere
            
$temp=$szamok[$j];
            
$szamok[$j]=$szamok[$j+1];
            
$szamok[$j+1]=$temp;
        }
    }
}

for(
$i=0;$i<$num;$i++) {
    echo
$szamok[$i]."<BR>";
}
?>
<strong></font>
</td></tr></table>
</body></html>