‎2007 Jun 14 2:36 PM
Hi frnds,
i m trying hard with this logic but i m not getting.
1
1 1
1 1 1
1 1 1 1
1 1 1 1 1
i hav written but not getting... CAN ANYONE THROW SOME LIGHT ON THIS...
Looking for ur hlp.
regards,
suraj
‎2007 Jun 14 2:45 PM
Hi,
see this code.
data:n type n.
do 5 times.
n = sy-index.
write:/ .
do n times.
write: '1'.
enddo.
enddo.
rgds,
bharat.
‎2007 Jun 14 2:42 PM
well what is your requirement?
to display such a triangle of 1´s?
‎2007 Jun 14 2:43 PM
You want to print this on a program?
1
1 1
1 1 1
1 1 1 1
1 1 1 1 1
Not sure why you need it....But try this -:)
DATA: CHARS TYPE STRING.
CHARS = '1'.
DO 5 TIMES.
WRITE:/ CHARS.
CONCATENATE CHARS '1'
INTO CHARS.
ENDDO.
Greetings,
Blag.
‎2007 Jun 14 2:45 PM
wow great approach, while i had a quick thought on it, my imaginary code was some lines longer^^
‎2007 Jun 14 2:55 PM
Hi Florian:
I do something like that a long time on Euphoria...So it wasn't hard for me to remember how I do it -;)
Please close the thread and give points is it was helpfull -:D
Greetings,
Blag.
‎2007 Jun 14 2:45 PM
Hi,
see this code.
data:n type n.
do 5 times.
n = sy-index.
write:/ .
do n times.
write: '1'.
enddo.
enddo.
rgds,
bharat.
‎2007 Jun 14 2:49 PM
hi
copy the code.
REPORT Z_71945_TEST.
data: a type i value 1,
count type i value 1.
do 5 times.
if count = 1.
write :a.
count = count + 1.
endif.
if count = 2.
write 😕 a,a .
count = count + 1.
endif.
if count = 3.
write 😕 a,a,a .
count = count + 1.
endif.
if count = 4.
write 😕 a,a,a,a .
count = count + 1.
endif.
if count = 5.
write 😕 a,a,a,a,a .
count = count + 1.
endif.
enddo.
regards
ravish
<i><b>plz dont forget to reward points if helpful</b></i>