Cod:
#include <fstream>
using namespace std;
int main()
{
int a, b, r, cmmdc;
ifstream fin(cmmdc.in");
ofstream fout("cmmdc.out");
fin>>a>>b;
r=a%b;
while(r)
{
a=b;
b=r;
r=a%b;
}
if(b<30000)
fout<<b;
}
Imi da 0 pct. ( l-am testat de 5-10 ori si functioneaza perfect. Chiar am inclus si o conditie acolo b<30.000


Foloseste tag-ul code cand postezi cod. Si foloseste un limbaj adecvat.
