samedi 24 septembre 2016
    1. Program PPCM;
    2. Var pcm, m, n, aux : Integer;
    3. Begin
    4. Repeat
    5. Writeln ('Saisir deux entiers > 0');
    6. Readln (m, n);
    7. Until (m>0) and (n>0);
    8. If m < n Then
    9. Begin
    10. aux:= m;
    11. m := n;
    12. n := aux;
    13. End;
    14. pcm := m;
    15. While (pcm mod n <> 0) Do pcm := pcm + m;
    16. Writeln ('PPCM = ', pcm);
    17. End.

0 commentaires:

Enregistrer un commentaire

Page Facebook

Turbo Pascal 32 bits

Turbo Pascal 64 bits