Accueil     Soft. MacOSX     Soft. MacOS/PC     PHP     Python     ROMS GBA     TP d'info     DBZ-GT     Martingales     Galeries     Liens     @  

Exercice 1 c

program ex1c;
const
nnotes = 3;
nfiches = 100;

type
fiche = record
num: integer;
nom: string;
groupe: char;
notes: array[1..nnotes] of real;
end;
pfiche = ^fiche;
session = array[1..nfiches] of pfiche;

var
pf: pfiche;
s: session;
ps: ^session;
i, j, compteur: integer;

begin
writeln('Exercice 1 c http://www.Software-DS.com');
for i := 1 to nfiches do
new(s[i]);
{ Allocation }
{ initialisation des données }
for i := 1 to nfiches do
begin
s[i]^.num := i;
s[i]^.nom := '----------';
s[i]^.groupe := '-';
for j := 1 to nnotes do
s[i]^.notes[j] := -1.0;
end;
{ Affichage }
compteur := 0;
for i := 1 to nfiches do
begin
writeln('Classement:', s[i]^.num : 0, ' Nom:', s[i]^.nom, ' Groupe:', s[i]^.groupe);
for j := 1 to 3 do
write(' ', s[j]^.notes[j] : 0);
compteur := compteur + 1;
writeln;
if ((compteur mod 10) = 0) then
readln;
end;

for i := 1 to nfiches do
dispose(s[i]);
{ désallocation }
writeln;
writeln('©2001 All Rights Reserved to www.Software-DS.com');
{ ©2001 All Rights Reserved to http://www.Software-DS.com 23/10/01 }
end.





Haut de la page - Page précédente - Page générée en 0.00323 sec.
Recherche personnalisée
 

1843745 visiteurs.   ©2001-2023 All Rights Reserved to Software-DS.com
Made with a mac  
Confidentialité