program tong
uses crt;
var n,i,tong,dem:integer;
begin clrscr; write('nhap so tu nhien:');readln(n); dem:=0; tong:=0;
for i:=1 to n do if n mod i = 0 then begin dem:=dem+1; tong:=tong+i; writeln(i,' la uoc cua ',n); end; writeln(n,' co ',dem,' uoc so'); write('tong cua cac uoc so la:',tong);
readln;
end.
program tong
uses crt;
var n,i,tong,dem:integer;
begin
clrscr;
write('nhap so tu nhien:');readln(n); dem:=0; tong:=0;for i:=1 to n do if n mod i = 0 then begin dem:=dem+1; tong:=tong+i; writeln(i,' la uoc cua ',n); end; writeln(n,' co ',dem,' uoc so'); write('tong cua cac uoc so la:',tong);
readln;
end.