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 difference between dialog program and a report?

1177


What is a help view? : abap data dictionary

1080


Can we define our own match code id's for sap matchcodes? : abap data dictionary

1030


Name the special commands of list?

1156


What is foreign key relationship? : abap hr

1107


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

1061


What is the differences between structure and table in the data dictionary in abap?

1158


What are the sequences of event block?

1081


What is check table?

1002


What is the different between abap and ooabap? Why do we use ooabap?

1182


What are the names of the function modules that will be generated upon activation of a lock object?

1009


Write an abap program for creation of customer enquiry using BAPI 'BAPI_INQUIRY_CREATEFROMDATA'.

2190


What is alv programming in abap?

1137


What are the prerequisites for creating foreign key relationship?

1154


Explain the use of table maintenance allowed?

1009