Bonjour, je suis un débutant niveau programmation, j'ai eu un "gros" exercice à faire.

Je pense avoir tout bien fait mais le compilateur me dit qu'il y a une erreur avec mon "end." de fin; j'ai cherché pendant des heures et j'ai rien trouvé

Est-ce que quelqu'un sait m'aider svp, suis désespéré là

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
program eurovisin;
const N = 5;
type encode = record
            score:integer;
            pays:string[20];
     end;
type tabpays = array [1..N] of encode;
 
var a:tabpays;
    choix:char;
    comptpays,i,m:integer;
 
procedure classement (t:tabpays;compt,z:integer);
   var i,j:integer;
       k:encode;
 
   begin
     for i:=1 to compt-1 do
       begin
         for j:=i+1 to compt do
            begin
              if t[j].score < t[i].score then
                 begin
                   k:= t[i];
                   t[i]:= t[j];
                   t[j]:= k;
                 end;
            end;
       end;
     for i:=1 to compt do writeln('num ',i,': ',t[i].pays,' score: ',t[i].score);
     if z = 0 then
                begin
                  writeln('podium');
                  writeln('------');
                  writeln();
                  for i:=1 to 3 do writeln('num ',i,': ',t[i].pays,' score: ',t[i].score);
                end;
    end;
 
 
procedure encodepays(var tab:tabpays; c:integer);
   var i:integer;
       t:char;
 
   begin
     c:=c + 1;
     t:= 'o';
     repeat
      if c > 5 then
                   begin
                      writeln('vous ne pouvez incérer plus de pays');
                      t:= 'n';
                   end
                else
                   begin
                      writeln('le numéro du pays à encoder attention 5 pays max');
                      readln(i);
                      writeln('tappez nom du pays : ');
                      readln(tab[i].pays);
                      writeln('encoder autre pays ?  [n,o]');
                      readln(t);
                   end;
      until (t = 'n') or (t = 'N');
   end;
 
procedure encodevotes (var tab:tabpays; c:integer);
   var i,j,k,mm:integer;
   begin
     mm := 1;
     for i:=1 to c do
       begin
         writeln(tab[i].pays,'distribue les points');
         for j:=1 to 8 do
           begin
             writeln('a qui donnez vous ', j,' points ? (tappez numero de pays)');
             readln(k);
             tab[k].score:= tab[k].score + j ;
           end;
         writeln('a qui donnez vous 10 pts?');
         readln(k);
         tab[k].score:= tab[k].score + 10;
         writeln('a qui donnez vous 12 pts?');
         readln(k);
         tab[k].score:= tab[k].score + 12;
         classement(tab,c,mm);
      end;
   end;
 
procedure quitter(var choix:char);
   begin
     writeln('quitter ? [o,n]');
     readln(choix);
     if (choix = 'o') or (choix = 'O') then choix:= '@';
   end;
 
begin
   m := 0;
   for i:=0 to N do a[i].score:= 0;
   comptpays:=0;
   repeat
     repeat
        writeln('concours eurovision');
        writeln('-------------------');
        writeln();
        writeln('1. Encodage des pays');
        writeln('2. Encodage des votes');
        writeln('3. Classement final');
        writeln();
        writeln('0. Quitter');
        readln(choix);
     until choix in ['0'..'3'];
     case choix of
         '0':quitter(choix);
         '1':encodepays(a,comptpays);
         '2':encodevotes(a,comptpays);
         '3':classement(a,comptpays,m);
     end;
  until choix = '@';
end.