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 difference between user exit, customer exit and badi?
What is a development class? : abap data dictionary
List the events in abap/4 language?
What are control tables?
If I have put commit in badi implementation class after update, is it allowed? Also if some standard functionality already implemented an update and now i m doing update and if it fails, what will be the impact of commit?
Explain the difference between a pool table and a transparent table?
Explain about interactive report?
A function module can be called from a transaction screen outside an abap/4 program. State true or false. : abap modularization
What is the use of the raising exception?
What is view? Explain the different types of view?
what is the difference between hashed & sorted internal tables?
What are interface/conversion programs in SAP?
How can we declare a table control in the abap/4 program?
what are the critical issues u face in ur project?
What is the major difference between pool tables and transparent tables?