Bonjour; j'ai un problème
Je ne sais pas comment utiliser les procédures en programme principal pour afficher trois tableaux de même taille en même temps ?
Parce que je veux trier un tableau par comptage avec trois tables.
Voici le code :
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
 
{cette procedure dessine un tableau de taille "tail"}
procedure DESSIN(tail:integer);
var i,k:integer;
  begin
    k:=2;
    gotoxy(1,8);
    write('Ú');
    gotoxy(1,9);
    write('³');
    gotoxy(1,10);
    write('À');
    for i:=1 to tail do
      begin
        gotoxy(k,8);
        write('ÄÄÄÄÄÂ');
        gotoxy(k,9);
        write('     ³');
        gotoxy(k,10);
        write('ÄÄÄÄÄÁ');
        k:=k+6;
      end;
        gotoxy(1+6*tail,8);
        write('¿');
        gotoxy(1+6*tail,9);
        write('³');
        gotoxy(1+6*tail,10);
        write('Ù');
  end;
{*********procedure ecritab*********}
procedure ECRITAB(k,tail:integer;t:tab);
var j,m:integer;
  begin
    gotoxy(1,8);
    clreol;
    gotoxy(1,9);
    clreol;
    gotoxy(1,10);
    clreol;
    DESSIN(tail);
    m:=2;
    for j:=1 to k do
      begin
        gotoxy(m,9);
        write(t[j]);
        m:=m+6;
      end;
  end;
 
(*±±±±±±±±± PROCEDURE :LIRETAB ±±±±±±±±±±±±±*)
procedure LIRETAB(var t:tab;var tail:integer);
var i,k:integer;
    ch:string;
  begin
     k:=2;
     i:=1;
     while i<=tail do
       begin
         gotoxy(k,9);
         read(t[i]);
         str(t[i],ch);
         if length(ch)>5 then
           begin
             gotoxy(19,15);
             sound(550);
             delay(500);
             nosound;
             textcolor(9);
             write('ERREUR! APPUYER SUR ENTREE POUR CORRIGER');
             readkey;
             gotoxy(1,14);
             clreol;
             textcolor(7);
             gotoxy(k+5,9);
             write('³');
             ECRITAB(i-1,tail,t);
             i:=i-1;
             k:=k-6;
           end;
             i:=i+1;
             k:=k+6;
       end;
  end;
Aidez-moi SVP