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

How can we handle table control in bdc? : abap bdc

1103


What is a currency factoring technique?

1200


What are the Control levels in internal tables?

1080


What do you mean by transparent tables in sap abap? : abap data dictionary

1024


What is a table cluster? : abap data dictionary

1151


There is 1 person but it’s displaying that this person cannot be booked. He is not available for the business event. Can you tell me where is it going wrong? What can be the reasons? : sap abap hr

1053


How will u handle the situation – In a report using function module to generate a IDOC, How will u handle the error IDOC in the same report ?

2176


Explain different types of locks?

1046


What are indexes? : sap abap data dictionary

1112


Explain what is an rfc?

1081


Name the abap/4 modularization techniques?

1068


What are the Synchronous and asynchronous methods in bdc ?

1055


Explain what are the events in screen programming?

1002


What are null values?

985


What is the table & field to identify the no of items (bottles) stored in one case?

2439