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
List out few of the applications that make use of Multilinked Structures?
What is string function c?
What is identifier in c?
What is s or c?
hi send me sample aptitude papers of cts?
List some of the static data structures in C?
Why are some ANSI/ISO Standard library routines showing up as undefined, even though I've got an ANSI compiler?
in programming languages a statement or part of a statement that specifies several different execution sequences a) constructs b) distructs c) executes d) none
Synonymous with pointer array a) character array b) ragged array c) multiple array d) none
write a program using linked list in which each node consists of following information. Name[30] Branch Rollno Telephone no i) Write the program to add information of students in linked list
Tell me the use of bit field in c language?
pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)
What is the difference between single charater constant and string constant?
What is use of pointer?
An organised method of depicting the use of an area of computer memory used to signify the uses for different parts of the memory a) swap b) extended memory c) memory map d) all of the above