Sha256: 8a1fd26ef97654fa929184f2a744a6b94a8a2ed6ac1dcd9b883324233a5f8aa7

Contents?: true

Size: 845 Bytes

Versions: 10

Compression:

Stored size: 845 Bytes

Contents

report zz_arithmetic no standard page heading.

" Read in the two numbers from the user.
selection-screen begin of block input.
  parameters: p_first type i,
              p_second type i.
selection-screen end of block input.

" Set the text value that is displayed on input request.
at selection-screen output.
  %_p_first_%_app_%-text  = 'First Number: '.
  %_p_second_%_app_%-text = 'Second Number: '.

end-of-selection.
  data: lv_result type i.
  lv_result = p_first + p_second.
  write: / 'Addition:', lv_result.
  lv_result = p_first - p_second.
  write: / 'Substraction:', lv_result.
  lv_result = p_first * p_second.
  write: / 'Multiplication:', lv_result.
  lv_result = p_first div p_second.
  write: / 'Integer quotient:', lv_result. " Truncated towards zero.
  lv_result = p_first mod p_second.
  write: / 'Remainder:',  lv_result.

Version data entries

10 entries across 7 versions & 1 rubygems

Version Path
zettacode-0.1.7 files.zettacode/arithmetic.integer/abap.txt
zettacode-0.1.6 files.zettacode/arithmetic.integer/abap.txt
zettacode-0.1.6 files.zettacode2/arithmetic.integer/abap.txt
zettacode-0.1.5 files.zettacode/arithmetic.integer/abap.txt
zettacode-0.1.5 files.zettacode2/arithmetic.integer/abap.txt
zettacode-0.1.4 files.zettacode/arithmetic.integer/abap.txt
zettacode-0.1.4 files.zettacode2/arithmetic.integer/abap.txt
zettacode-0.1.3 files.zettacode/arithmetic.integer/abap.txt
zettacode-0.1.2 files.zettacode/arithmetic.integer/abap.txt
zettacode-0.1.1 zettacode.files/arithmetic.integer/abap.txt