Please tell me what's wrong with my code:
[pascal]program Perfection;
var
a,i:longint;
s:longint;
begin
writeln('PERFECTION OUTPUT');
read(a);
while a<>0 do begin s:=0;
if a=1 then writeln(' 1 PERFECT') else begin
for i:=1 to ((a mod 2) + (a div 2)) do begin
if a mod i = 0 then s:=s+i;
if ...