Răspunsuri

2014-04-17T23:03:20+03:00
Int cmmdc(int a, int b)
{int r;

while (r!=0)
{a=b;
b=r;
r=a%b;
}
return b;
}
int main()
{int a,b;
cin>>a>>b;
cout<<"C.m.m.d.c: "<<cmmdc(a,b)<<endl;
cout<<"C.m.m.m.m.c: "<<a*b/cmmdc(a,b);
}
Am facut in subprogram.