10 REM 'ABS' SUBROUTINE TEST PROGRAM
20 PRINT "ENTER A NEGATIVE NUMBER";
30 INPUT X
35 IF X = 0 THEN 30999
40 GOSUB 30000
50 PRINT "THE ABSOLUTE VALUE OF";X;"IS";Y
60 GOTO 20
30000 REM * ABS(X) SUBROUTINE * INPUT X, OUTPUT Y
30010 IF X>=0 THEN 30040
30020 Y=X*-1
30030 RETURN
30040 Y=X
30050 RETURN
30999 END
