DECLARE X NUMBER:=&请输入1; Y NUMBER:=&请输入2; Z NUMBER; C NUMBER;D NUMBER; BEGIN IF X>=Y THEN Z:=Y; ELSE Z:=X; END IF; C:=Z; LOOP IF (MOD(X,C)=0 AND MOD(Y,C)=0) THEN D:=C; EXIT; END IF; C:=C-1; END LOOP; dbms_output.put_line(D); END;
DECLAREX NUMBER:=&请输入1;Y NUMBER:=&请输入2;Z NUMBER;C NUMBER;D NUMBER;BEGINIF X>=Y THEN Z:=Y;ELSE Z:=X; END IF; C:=Z;LOOPIF (MOD(X,C)=0 AND MOD(Y,C)=0) THEN D:=C;EXIT;END IF; C:=C-1; END LOOP; dbms_output.p