REPORT largest_number_program.
DATA: num1 TYPE i,
num2 TYPE i,
num3 TYPE i,
largest_number TYPE i.
PARAMETERS: p_num1 TYPE i,
p_num2 TYPE i,
p_num3 TYPE i.
INCLUDE largest_number_subroutine.
START-OF-SELECTION.
PERFORM find_largest_number.
FORM find_largest_number.
IF p_num1 >= p_num2 AND p_num1 >= p_num3.
largest_number = p_num1.
ELSEIF p_num2 >= p_num1 AND p_num2 >= p_num3.
largest_number = p_num2.
ELSE.
largest_number = p_num3.
ENDIF.
WRITE: / 'The largest number is', largest_number.
ENDFORM.
0 Comments