<?php
//Le formulaire
echo '
<form method="post" action="'.$PHPSELF.'">
<input type="text" name="NB" size="3" value="'.$NB.'">
<input type="submit" name="forum_question" value="Calcul ->">
</form> ';
//--
$lx=1;
$var[0][0]=1;
$NB++;
while($y<$NB){
$y++;
$x=1;
while($x<=$lx){
$var[$x][$y]=$var[$x-1][$y-1] + $var[$x][$y-1];
if($y==$NB){
if($lx!=1){
if($lx!=$x){
$c=$y-$x;
$e= $x-1;
$d=$y-1;
if($c=="1"){$c="";} if($e=="1"){$e="";}
if($x!="1"){print " + <b>".$var[$x][$y]."</b>a".$c."b".$e;}else{print "Reponse : a".$d." ";}
}else {print " + b".$d;}
}
}
$x++;
}
$lx++;
}
?> 
Ecrit le 1-/-1/2005 par Sky
http://www.graphiks.net
Nous - Plan du site - Informations légale - Contact - © Graphiks.net