Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is the difference between a structure and a table? : abap data dictionary

1157


What are the types of subroutines? : abap data dictionary

1055


Differentiate between ooabap and abap?

1302


What happens if a function module runs in an update task? : abap modularization

1113


why particularly lock object name starts with EZ OR EY?

2054


What is the difference between upload and ws_upload ? : abap bdc

1282


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

1006


Event handling in oops

1579


What are control tables?

1177


What is step-loop?

1140


What should be declared explicitly in the corresponding abap/4 statements to access internal tables without header lines & why? : abap modularization

1158


How do you differentiate tax for different countries? : sap abap hr

1232


What kind of financial periods exist in SAP? What is the relevant table for that?

1167


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

1318


Can any tell me ECC 5.0, ECC 6.0 Released year? and difference between them?

2543