lundi 12 septembre 2016
    1. Program Sans_Redondance ;
    2. Var
    3. ch1, ch2, ch3, aux : String;
    4. i : integer;
    5. Begin
    6. Write('Chaîne 1 = ');
    7. Readln (ch1);
    8. Write('Chaîne 2 = ');
    9. Readln (ch2);
    10. If length(ch1)>length(ch2) Then
    11. Begin
    12. aux:=ch1;
    13. ch1:=ch2;
    14. ch2:=aux;
    15. End;
    16. ch3:='';
    17. For i:=1To Length(ch1) Do
    18. If (POS(ch1[i],ch2)<>0)and(POS(ch1[i],ch3)=0) Then ch3:=ch3+ch1[i];
    19. Writeln(ch3);
    20. End.

1 commentaire:

  1. c'est bien ce que vous faites. ceci aide des gens comme à s'ameliorer en programmation.
    bonne continuation

    RépondreSupprimer

Page Facebook

Turbo Pascal 32 bits

Turbo Pascal 64 bits