ABAP PROGRAM SHOWING FACTORIAL FOR 1 TO 5 NUMBERS.
REPORT yfactorial_prathyusha.
DATA: n1 TYPE i VALUE 5,
n2 TYPE i,
fact TYPE i VALUE 1.
DO 5 TIMES.
N2 = N1.
WHILE N2 >= 1.
FACT = FACT * N2.
N2 = N2 - 1.
ENDWHILE.
WRITE: / 'FACTORIAL OF: ' , N1 ,FACT.
FACT = 1.
N1 = N1 - 1.
ENDDO.