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
What is the difference between a structure and a table? : abap data dictionary
What are the types of subroutines? : abap data dictionary
Differentiate between ooabap and abap?
What happens if a function module runs in an update task? : abap modularization
why particularly lock object name starts with EZ OR EY?
What is the difference between upload and ws_upload ? : abap bdc
Suppose the client wants me the vacancy to be displayed on a website as well as ess. How should I do it? : sap abap hr
Event handling in oops
What are control tables?
What is step-loop?
What should be declared explicitly in the corresponding abap/4 statements to access internal tables without header lines & why? : abap modularization
How do you differentiate tax for different countries? : sap abap hr
What kind of financial periods exist in SAP? What is the relevant table for that?
It is possible to assign a local data object defined in a subroutine or function module to a field group. State true or false. : abap modularization
Can any tell me ECC 5.0, ECC 6.0 Released year? and difference between them?