Cod:
#include<fstream>
using namespace std;
int cmmdc(int a, int b){
if (a%b==0){
return b;}
else{
return cmmdc(b,a%b);}}
int main(){
long a,b;
ifstream in("cmmdc.in");
ofstream out("cmmdc.out");
in>>a;
in>>b;
if (cmmdc(a,b)<=30000){
out<<cmmdc(a,b);
if (cmmdc(a,b)==1){out<<"0";}}
out.close();
in.close();
return 0;}
Ce este gresit?

[editat de moderator] foloseste tag-ul "code" cand postezicod pe forum.
