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 are indexes? : abap hr

1128


What is the major difference between pool tables and transparent tables?

1106


What is off cycle payroll run

2270


What are the three hierarchical levels of data types and objects?

1163


What is sap locking?

1069


Does sap handle multiple languages?

1020


Explain what are the system fields? Explain?

1130


How many types of size categories and data classes are there?

1085


Can you print decimals in type n? What is difference between float and packed data type?

1230


What is the use of enqueue function module? : sap abap data dictionary

1119


The max number of calling modes stacked at one time is?

1115


What are the different types of the variable in the sap abap?

1143


Explain the differences between se01, se09 and se10?

1122


What is the use of start-of-selection.,if not use in report what will happen,?

1690


What are the difference between pool tables and transparent tables?

1140