Responsive Ad Area

Share This Post

test

Error in PL/SQL code and cannot understand the error and mistake in the code

declare

sum number:=0;

count number:=0;

pnum number:=0;

temp number;

begin

for i in 1..25

loop

temp:=i;
count:=0;

for j in 1..25
loop

    if mod(i,j)=0 then
        count:=count+1;
    end if;

end loop;

if count=2 then
    sum:=sum+temp;
    pnum:=pnum+1;
end if;

exit when pnum=10;

end loop;

dbms_output.put_line(sum);

end;


Error in PL/SQL code and cannot understand the error and mistake in the code
Error in PL/SQL code and cannot understand the error and mistake in the code
test
{$excerpt:n}

Share This Post

Leave a Reply

Your email address will not be Publishedd. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Skip to toolbar