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

using for loop sum 2 number of any 4 digit number in c language

2351


a program that can input number of records and can view it again the record

1920


What is the difference between near, far and huge pointers?

1099


in ‘C’ language for Matrix Multiplication fails” Introspect the causes for its failure and write down the possible reasons for its failure.

8056


What is a function simple definition?

1103


What is a node in c?

980


What is the difference between variable declaration and variable definition in c?

1065


Where register variables are stored in c?

970


Explain the bubble sort algorithm.

1079


Is fortran still used in 2018?

1043


What happens if header file is included twice?

1154


Do you know the difference between malloc() and calloc() function?

1072


Is that possible to add pointers to each other?

1377


What is a stream in c programming?

1159


I need a sort of an approximate strcmp routine?

1034