*&

--------------------------------------------------------------------*
*& Report ZPRG
*&
*&--------------------------------------------------------------------*
*&
*&
*&--------------------------------------------------------------------*

REPORT ZPRG NO STANDARD PAGE HEADING .
" variable declaration intialization
DATA: GV_VAL1 TYPE P DECIMALS 3 VALUE
GV_VAL2 TYPE P DECIMALS 3 VALUE
GV_VAL3 TYPE P DECIMALS 3 VALUE
GV_VAL4 TYPE P DECIMALS 3 VALUE
GV_ADD TYPE P DECIMALS 2,
GV_SUB TYPE P DECIMALS 2,
GV_MUL TYPE P DECIMALS 2,
GV_DIV TYPE P DECIMALS 2,
GV_REM TYPE P DECIMALS 2,
GV_REM1 TYPE P DECIMALS 2,
GV_LP
TYPE I VALUE '1',
GV_EV_OD(10) TYPE C.
GV_VAL1
GV_VAL2
GV_VAL3
GV_VAL4

=
=
=
=

'10.50'.
'10.50'.
'10.50'.
'10.50'.

* MATHEMATICAL OPERATIONS

'12.341',
'13.749',
'17.497',
'11.346',

'|' NO-GAP. IF GV_REM1 = '0'. WRITE: / '|' NO-GAP .(15) GV_MUL CENTERED COLOR 6 NO-GAP. ULINE /(97).'|'.(15) GV_EV_OD CENTERED COLOR 1 NOGAP. GV_VAL3 * GV_VAL4 . '|' NO-GAP.(15) GV_DIV CENTERED COLOR 4 NO-GAP.(15) 'ADDITION' CENTERED COLOR 1 NO-GAP. ENDWHILE. ENDIF.(15) 'EVEN/ODD' CENTERED COLOR 7 NOGAP. '|' NO-GAP.GV_ADD = GV_VAL1 + GV_VAL2 + GV_SUB = ( GV_VAL1 + GV_VAL4 GV_MUL = GV_VAL1 * GV_VAL2 * GV_DIV = ( GV_VAL1 + GV_VAL3 GV_REM = ( GV_VAL4 + GV_VAL3 GV_REM1 = GV_ADD MOD 2.(95) 'MATHEMATICAL OPERATIONS' CENTERED COLOR 1 NO-GAP . + GV_VAL4 ) / GV_VAL2. . '|' NO-GAP. ULINE /(97).(15) 'MULTIPLICATION' CENTERED COLOR 4 N O-GAP. ) . WRITE: /'|' NO-GAP. '|' NO-GAP. GV_VAL3 + GV_VAL4 .(15) GV_ADD CENTERED COLOR 7 NO-GAP. '|' NO-GAP.(15) 'REMAINDER' CENTERED COLOR 6 NO-GAP. '|' NO-GAP. ULINE /(97). '|' .(15) GV_REM CENTERED COLOR 3 NO-GAP.'|'.(15) 'DIVISION' CENTERED COLOR 5 NO-GAP.(15) 'SUBTRACTION' CENTERED COLOR 3 NOGAP. GV_LP = GV_LP + 1. GV_EV_OD = 'odd'. ULINE /(97). WHILE GV_LP <= 10. '|' NO-GAP. WRITE: /'|' NO-GAP. '|' NO-GAP.(15) GV_SUB CENTERED COLOR 5 NO-GAP. ) MOD GV_VAL2. '|' NO-GAP. GV_EV_OD = 'even'.( GV_VAL2 + GV_VAL3 ). ELSE .

Sign up to vote on this title
UsefulNot useful