write the program for prime numbers between 1 to 1000
Answer Posted / kallol banerjee
data: n type i default 1,
m type i,
p type i,
r type p decimal 2,
l_v_cnt type n.
do n times.
if n <= 1000.
m = 1.
do m times.
if m <= n.
r = n / m.
p = n / m.
m = m + 1.
if r = p.
l_v_cnt = l_v_cnt + 1.
endif.
endif.
enddo.
else.
exit.
endif.
if l_v_cnt = '2'.
write: n.
endif.
n = n + 1.
enddo.
Is This Answer Correct ? | 19 Yes | 11 No |
Post New Answer View All Answers
If I forgot some command in sap script e.g.: Suppress zero display – how to do find it?
What are the differences between domain and data element?
How to combine multiple order in one Delivery ( Step by Step)?
What is sap abap data dictionary?
What does a lock object involve?
Difference between /N and /BEND?
How do we assign dynamic views while creating material master and generating bdc? : abap bdc
How do you find if a logical database exists for your program requrements?
Explain what are standard layouts sets in the sap script?
What are hashed tables?
Why we are using Macros instead of Function Modules
What is the use of info groups? : sap abap hr
What is netweaver???what is the relationship with ABAP?
in bdc session method. if u run the record in fore ground manually i have a 7 records but at the time of record processing first record produces the error how can u process records manually in fore ground please tell me any one knows?
What are the differences between table controls and step loops?