Uite asa este bine: var d,n,s,p:integer; begin repeat readln(n); until n>0; s:=0; p:=1; for d:= 1 to n div 2 do if n mod d=0 then if d mod 2=0 then S:=S+d else P:=P*d; if S>0 then Writeln('suma divizorilor pari ai numarului este ',S); if P>0 then Writeln('produsul divizorilor impari ai numarului este ',S); end. LE: BTW nu l-am testat deci nu sunt sigur daca merge 100% +nu sunt sigur daca asta este cel mai eficient algoritm!