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 dialog program and a report?
What is a help view? : abap data dictionary
Can we define our own match code id's for sap matchcodes? : abap data dictionary
Name the special commands of list?
What is foreign key relationship? : abap hr
How to display if the value entered contains records or not?
What is the differences between structure and table in the data dictionary in abap?
What are the sequences of event block?
What is check table?
What is the different between abap and ooabap? Why do we use ooabap?
What are the names of the function modules that will be generated upon activation of a lock object?
Write an abap program for creation of customer enquiry using BAPI 'BAPI_INQUIRY_CREATEFROMDATA'.
What is alv programming in abap?
What are the prerequisites for creating foreign key relationship?
Explain the use of table maintenance allowed?