Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

help regarding program to display even numbers

sudhir_uppalapati
Participant
0 Likes
425

plz send me a program to display even numbers from 1 to 100.

plz send me a program to display even numbers from 1 to 100.

2 REPLIES 2
Read only

Former Member
0 Likes
406

Report Zeven.

data : i type i.

i = 2.

while i <= 100.

write 😕 i.

i = i + 2.

endwhile.

Read only

Former Member
0 Likes
406

DATA : VAL TYPE I.

DO 100 TIMES.

COMPUTE VAL = SY-INDEX MOD 2.

IF VAL EQ 0.

WRITE : / 'Even NOs are' , SY-INDEX.

*ELSE.

*WRITE

ENDIF.

ENDDO.

REGARDS

SHIBA DUTTA