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
State the system field for the current date?
What is a size category?
What is a predefined type in abap?
What is table buffer?
What do you mean by batch data communications programming?
What is the client concept in sap?
What is the difference between Check and Continue?
What are the update types possible? : abap data dictionary
How to display or know if the value entered contains records or not?
What is hotspot?
How to handle error in session method? : abap bdc
What are the system fields you have worked with? Explain?
What are the disadvantages of different types of bdc's?
On which even we can validate the input fields in module progams?
What are data classes? What are the various data classes available for selection? : abap data dictionary