samedi 10 septembre 2016
    1. Program Palindrome;
    2. Var ch, inv : String;
    3. i : Integer;
    4. Begin
    5. Writeln ('Saisir une chaîne');
    6. Readln (ch);
    7. inv := '' ;
    8. For i := Length (ch) Downto 1 Do inv := inv + ch[i];
    9. If ch = inv Then Writeln (ch, ' est palindrome')
    10. Else
    11. Writeln (ch, ' n''est pas palindrome');
    12. End.

0 commentaires:

Enregistrer un commentaire

Page Facebook

Turbo Pascal 32 bits

Turbo Pascal 64 bits