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?

Answer Posted / naveen reddy

This is written in PL/SQL: TO check wether given number is prime or not

DECLARE
i number:=&i;
j number:=2;
ch number:=0;
BEGIN
WHILE(j<=i/2) loop

if mod(i,j)=0 then
dbms_output.put_line('not prime');
ch:=1;
exit ;
else
j:=j+1;
end if;
end loop;

if ch=0 then
dbms_output.put_line('prime number');
end if;
end;

Is This Answer Correct ?    106 Yes 23 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is character constants?

1231


How can you determine the maximum value that a numeric variable can hold?

1298


In a byte, what is the maximum decimal number that you can accommodate?

1197


Who invented b language?

1473


What is difference between union and structure in c?

1244


program to convert a integer to string in c language'

2507


What is double pointer?

1041


Write a function that will take in a phone number and output all possible alphabetical combinations

1100


List some applications of c programming language?

998


What is the scope of an external variable in c?

1095


What is variable and explain rules to declare variable in c?

1178


What are the 5 types of inheritance in c ++?

1073


When would you use a pointer to a function?

1097


What is operator promotion?

1130


What is a sequential access file?

1242