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
|
procedure TForm11.FormCreate(Sender: TObject);
begin
Ta[1,1] := 2;
Ta[1,2] := 3;
Ta[1,3] := 4;
Ta[1,4] := 5;
Ta[1,5] := 6; {colonne n° 1 correspond edit 1}
Ta[1,6] := 1;
Ta[1,7] := 2;
Ta[1,8] := 3;
Ta[1,9] := 4;
Ta[1,0] := 1;
Ta[2,1] := 3;
Ta[2,2] := 4;
Ta[2,3] := 5;
Ta[2,4] := 6;
Ta[2,5] := 1; {colonne n° 2 edite2}
Ta[2,6] := 2;
Ta[2,7] := 3;
Ta[2,8] := 4;
Ta[2,9] := 5;
Ta[2,0] := 2;
Ta[3,1] := 4;
Ta[3,2] := 5;
Ta[3,3] := 6;
Ta[3,4] := 1;
Ta[3,5] := 2; {colonne n° 3 edit3}
Ta[3,6] := 3;
Ta[3,7] := 4;
Ta[3,8] := 5;
Ta[3,9] := 6;
Ta[3,0] := 3;
Ta[4,1] := 5;
Ta[4,2] := 6;
Ta[4,3] := 1;
Ta[4,4] := 2;
Ta[4,5] := 3; {colonne n° 4 edite4}
Ta[4,6] := 4;
Ta[4,7] := 5;
Ta[4,8] := 6;
Ta[4,9] := 7;
Ta[4,0] := 4;
end;
procedure TForm11.Button1Click(Sender: TObject);{bouton de stokage}
begin
Val(Edit1.Text,C1);
Val(Edit2.Text,C2);
Val(Edit3.Text,C3); {stokage dans la variable C des quatre chiffre tapper dans edit}
Val(Edit4.Text,C4);
end;
procedure TForm11.Button3Click(Sender: TObject);{bouton de resulta dans edit5}
begin
Val(Edit5.Text,C1,C2,C3,C4);
C1:=Ta[1,{frappe 0 a 9'}];
C2:=Ta[2,{frappe 0 a 9'}]; {théorique}
C3:=Ta[3,{frappe 0 a 9'}];
C4:=Ta[4,{frappe 0 a 9'}];
end;
end. |