The REM statement

The REM statement
    This statement is used to insert remarks (REMarks) or identification comments in a program.
    The form of the REM statement is
    The_REM_statement.jpg
    The comments may be any message not enclosed between quotes.
    Eg:
    29 REM THIS PROGRAM CALCULATES
    30 REM THE SUM OF THREE NUMBERS
    when the comment cannot be contained in one line, it may be continued on the next line with new line number and the word REM.
    Program
    One foot = 12.0 inches, one inch = 2.54 centimeters. Develop a program to compute inches and feet of 76.2 centimeters. Print the result as
    CM = INCHES = FEET =
    10 REM PROGRAM TO COMPUTE INCHES AND
    20 REM FEET WHEN GIVEN DATUM IS IN CM
    30 READ A, B, C
    40 DATA 12.0, 2.54, 76.2
    50 J=C/B
    60 REM VARIABLE J STORES THE NUMBER OF
    70 REM INCHES IN C CENTIMETERS
    80 F=J/A
    90 REM VARIABLE F STORES THE NUMBER OF
    100 REM FEET IN J INCHES
    110 PRINT “CM =”, C,”INCHES=”,J.”FEET =”, F
    120 STOP
    130 END

Last modified: Wednesday, 18 January 2012, 11:12 PM