function factorsfun(t)
%调用形式:factorsfun(t),t为一正整数.
%Author:LIQING 2007-1-14
k=1;
for i=1:t
if t/i-round(t/i)==0
a(k)=i;k=k+1;
end
end
disp('factors:');
disp(num2str(a));
b=a;
for h=length(a):-1:2
for l=(h-1):-1:2
if a(h)/a(l)-round(a(h)/a(l))==0
b(h)=0;
end
end
end
b(find(b==0):length(a))=[];
disp('the smallest prime factors:');
disp(num2str(b));