CLS
INPUT ENTER FIRST NUMBER; A
INPUT ENTER SECOND NUMBER; B
IF A > B THEN
R = A MOD B
Q = A B
ELSE
R = B MOD A
Q = B A
END IF
PRINT QUOTIENT=; Q
PRINT REMAINDER =; R
END
USING SUB
DECLARE SUB QR(A,B)
CLS
INPUT ENTER FIRST NUMBER; A
INPUT ENTER SECOND NUMBER; B
CALL QR(A,B)
END
SUB QR(A,B)
IF A > B THEN
R = A MOD B
Q = A B
ELSE
R = B MOD A
Q = B A
END IF
PRINT QUOTIENT=; Q
PRINT REMAINDER =; R
END SUB
0 Comments