09-26-2005 2:10 PM
Hai,
Iam new to abap can any one solve the above example:
data: c type i,
c1 type i,
len type i,
flag type c.
parameters word(20).
c = 0.
len = strlen( word ).
c1 = len - 1.
len = len / 2.
flag = ' '.
do len times.
if ( wordc(1) <> wordc1(1) ).
flag = 'X'.
endif.
enddo.
if flag = 'X'.
write: / 'Word', word, 'is not Palindrome'.
else.
write: / 'Word', word, 'is Palindrome'.
endif.
Inthe above program
if word = abap
than what is the value of
wordc(1) and wordc1(1)
and how many times the do statement work.
Please explain the above program with the above example.
09-26-2005 2:26 PM
you should have posted this in ABAP forum.
anyhow to answer your question.
if word = abap
than what is the value of
wordc(1) and wordc1(1)
c1 = 4 - 1 .
c = 0
word+c(1) => a
word+c1(1) => p
Regards
Raja
09-26-2005 2:26 PM
you should have posted this in ABAP forum.
anyhow to answer your question.
if word = abap
than what is the value of
wordc(1) and wordc1(1)
c1 = 4 - 1 .
c = 0
word+c(1) => a
word+c1(1) => p
Regards
Raja