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
using for loop sum 2 number of any 4 digit number in c language
a program that can input number of records and can view it again the record
What is the difference between near, far and huge pointers?
in ‘C’ language for Matrix Multiplication fails” Introspect the causes for its failure and write down the possible reasons for its failure.
What is a function simple definition?
What is a node in c?
What is the difference between variable declaration and variable definition in c?
Where register variables are stored in c?
Explain the bubble sort algorithm.
Is fortran still used in 2018?
What happens if header file is included twice?
Do you know the difference between malloc() and calloc() function?
Is that possible to add pointers to each other?
What is a stream in c programming?
I need a sort of an approximate strcmp routine?