SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS:
A TYPE I,
B TYPE I,
OP TYPE STRING.
SELECTION-SCREEN END OF BLOCK B1.
DATA:
RESULT TYPE P LENGTH 16 DECIMALS 2.
IF ( OP ='ADDITION' OR
OP = 'SUBSTRACTION' OR
OP = 'MULTIPLICATION' OR
OP = 'DIVISION').
CASE OP.
WHEN 'ADDITION' .
RESULT = A + B.
WHEN 'SUBSTRACTION'.
RESULT = A - B.
WHEN 'MULTIPLICATION'.
RESULT = A * B.
WHEN 'DIVISION'.
RESULT = A / B.
ENDCASE.
WRITE:/ 'OUTPUT',
RESULT.
ELSE.
WRITE: 'RE-ENTER THE VALUES WITH CORRECT OPPERATION' .
ENDIF.
PARAMETERS:
A TYPE I,
B TYPE I,
OP TYPE STRING.
SELECTION-SCREEN END OF BLOCK B1.
DATA:
RESULT TYPE P LENGTH 16 DECIMALS 2.
IF ( OP ='ADDITION' OR
OP = 'SUBSTRACTION' OR
OP = 'MULTIPLICATION' OR
OP = 'DIVISION').
CASE OP.
WHEN 'ADDITION' .
RESULT = A + B.
WHEN 'SUBSTRACTION'.
RESULT = A - B.
WHEN 'MULTIPLICATION'.
RESULT = A * B.
WHEN 'DIVISION'.
RESULT = A / B.
ENDCASE.
WRITE:/ 'OUTPUT',
RESULT.
ELSE.
WRITE: 'RE-ENTER THE VALUES WITH CORRECT OPPERATION' .
ENDIF.
No comments:
Post a Comment