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 going life actually? What is the role of a functional consultant in it? : sap abap hr
What are authorization objects and what statement is used to perform an authorization check in an abap program?
What is the max no of match code id’s that can be defined for one match code object?
What are the names of the function modules that will be generated upon activation of a lock object?
What are the two methods for modifying sap standard tables?
what is the process of creating quotation using BAPIs.
hi I am in training of functional module, i am unable to understand what exactly use of IDOC,BAPI,DIM and BIM. As LSMW and BDC methods are used for data conversion from legacy to sap. Might be it is silly question. please explain me
Define subtype ? : abap hr
Is there any BAPI to retrieve list of customers and their sales areas i.e., Cust No, Distr Channel and Division for all the customers.
Sy index and sy tabix
What is sapnet?
Explain the advantages and disadvantages of abap query tool?
What are the components of sap scripts? : abap hr
Explain get pernr concept when we use logical data base? : abap hr
What is buffering allowed but switched off?