Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //fpc 3.0.0
- program HelloWorld;
- var
- // declaration tableau
- table:array[2..20] of string;
- j, i:integer;
- nouvelle_lettre:boolean;
- begin
- // remplissage tableau
- table[2] := 'a';
- table[3] := 'b';
- table[4] := 'c';
- table[5] := 'd';
- table[6] := 'e';
- table[7] := 'f';
- table[8] := 'g';
- table[9] := 'h';
- table[10] := 'i';
- table[11] := 'j';
- table[12] := 'k';
- table[13] := 'l';
- table[13] := 'a';
- table[13] := 'l';
- table[14] := 'e';
- table[15] := 'b';
- table[16] := 'x';
- table[17] := 'd';
- table[18] := 'e';
- table[19] := 'w';
- table[20] := 'z';
- // affichage tableau
- for j:= 2 to 20 do
- begin
- // verification si lettre a été deja afficher
- nouvelle_lettre := true;
- for i:= 2 to j - 1 do
- begin
- if table[j] = table[i] then
- begin
- nouvelle_lettre := false
- end;
- end;
- // affichage lettre dans position j
- if nouvelle_lettre then
- begin
- writeln(table[j] );
- end;
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement