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
Why static is used in c?
How do you list files in a directory?
Can main () be called recursively?
an expression contains relational operators, assignment operators, and arithmatic operstors. In the absence of parentheses, they will be evaluated in which of the following order a) assignment, relational, arithematic b) arithematic, relational, assignment c) relational, arithematic, assignment d) assignment, arithematic, relational
Can you please explain the difference between strcpy() and memcpy() function?
Explain the bubble sort algorithm.
my project name is adulteration of chille powder.how can i explain it to the hr when he asks me about the project?
The __________ attribute is used to announce variables based on definitions of columns in a table?
What is the use of printf() and scanf() functions?
write a progrmm in c language take user interface generate table using for loop?
Write a program to print fibonacci series without using recursion?
Differentiate between null and void pointers.
Why c is known as a mother language?
How can you read a directory in a C program?
How are pointers declared in c?