a=input ('1.tamsayi: '); b=input ('2.tamsayi: ');for i=1:a*b if((mod(i,a)==0) && (mod(i,b)==0)fprintf (' \nOkek(%d,%d)=%d\n',a,b,i); break c=max([a b]); for i =c:-1:1 if ((mod(a,i)==0 && (mod(b,i)==0))) fprintf('OBEB(&d,%d)=%d\n',a,b,i); break endif endforendfor
MATLAB: Syntax error,the goal is to calculate the smallest common divisor with the entered numbers. but I can not do . it constantly gives syntax error. given by fprintf
errorhelpMATLAB
Best Answer