A voir également:
- Ppcm recursive
- Ppcm algorithme pascal - Meilleures réponses
- Ppcm et pgcd algorithme - Meilleures réponses
- Grep recursive - <a href="https://forums.commentcamarche.net/forum/astuces-et-solutions-378">Astuces et Solutions</a>
- Fonction ppcm recursive ✓ - <a href="https://forums.commentcamarche.net/forum/programmation-3">Forum Programmation</a>
- Ppcm - <a href="https://forums.commentcamarche.net/forum/programmation-3">Forum Programmation</a>
- Find not recursive ✓ - <a href="https://forums.commentcamarche.net/forum/programmation-3">Forum Programmation</a>
- Ppcm et pgcd - <a href="https://forums.commentcamarche.net/forum/c-266">Forum C</a>
5 réponses
il y a une autre méthode pour le PPCM, par addition. Voila le code en PASCAL :
Function PPCM(A,B:integer);
var a1,b1:integer;
begin
a1:=a;
b1:=b;
WHILE a1<>b1 do
begin
if a1<b1 then
a1:=a1+A
else
b1:=b1+b;
end;
PPCM:=a1;
end;
Function PPCM(A,B:integer);
var a1,b1:integer;
begin
a1:=a;
b1:=b;
WHILE a1<>b1 do
begin
if a1<b1 then
a1:=a1+A
else
b1:=b1+b;
end;
PPCM:=a1;
end;
emoss
a et b represente koi stp je ne comprend pas
BadrBenbiga
Messages postés
1
Statut
Membre
a et b constitue les deux nombres que vous voulez chercher leurs PPCM :)