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

State the system field for the current date?

1125


What is a size category?

1173


What is a predefined type in abap?

1231


What is table buffer?

1075


What do you mean by batch data communications programming?

1023


What is the client concept in sap?

1161


What is the difference between Check and Continue?

1185


What are the update types possible? : abap data dictionary

1066


How to display or know if the value entered contains records or not?

1110


What is hotspot?

1535


How to handle error in session method? : abap bdc

1348


What are the system fields you have worked with? Explain?

1184


What are the disadvantages of different types of bdc's?

1164


On which even we can validate the input fields in module progams?

1114


What are data classes? What are the various data classes available for selection? : abap data dictionary

1069