Solutions Boukadoum
etudiant.txt
youcef
bkdm
15
a
b
5
d
f
12
yy
bbkdm
5
ll
ii
4
gg
wp
1
------------------------------------------
calcule.php
La liste des etudiants ";
echo "
La liste des etudiants admis
";
echo "La liste des etudiants non admis
";
echo "";
echo "Nom | Prenom | Note | ";
$nom = fgets($fd);
$prenom = fgets($fd);
$note =fgets($fd);
while(!feof($fd) && $nom!="" ){
if($note >= 10){
echo "
$nom | $prenom | $note | ";
}
$nom = fgets($fd);
$prenom = fgets($fd);
$note =fgets($fd);
}
echo "
";
echo "";
echo "Nom | Prenom | Note | ";
fseek($fd, 0);
$nom = fgets($fd);
$prenom = fgets($fd);
$note =fgets($fd);
while(!feof($fd) && $nom!=""){
if((int)$note < 10){
echo "
$nom | $prenom | $note | ";
}
$nom = fgets($fd);
$prenom = fgets($fd);
$note =fgets($fd);
}
echo "
";
fclose($fd);
echo "
";
echo "Cliquer Ici pour afficher le nombre des etudiants transferes.";
}
?>
------------------------------------------
transfert.php
= 10){
$nom .= $prenom.$note;
fwrite($fd2, $nom);
$a++;
}
$n++;
$nom = fgets($fd1);
$prenom = fgets($fd1);
$note =fgets($fd1);
}
$pourcentage = ($a /$n)*100;
echo "Le pourcentage des transfert.
";
echo "Le pourcentage du nombre d'etudiant transferes = $pourcentage%";
fclose($fd1);
fclose($fd2);
}
?>
------------------------------------------
admis.txt
youcef
bkdm
15
d
f
12