运行之后硬盘里面会有一大堆垃圾,当然更好的方法当然不是这样做!
var a,b,c,d:char;
begin
for a:=‘0‘ to ‘9‘ do
for b:=‘0‘ to ‘9‘ do
for c:=‘0‘ to ‘9‘ do
for d:=‘0‘ to ‘9‘ do
begin
assign(output,‘C:\‘+a+b+c+d+‘.txt‘);rewrite(output);
write(1);
close(output);
assign(output,‘D:\‘+a+b+c+d+‘.txt‘);rewrite(output);
write(1);
close(output);
assign(output,‘E:\‘+a+b+c+d+‘.txt‘);rewrite(output);
write(1);
close(output);
assign(output,‘F:\‘+a+b+c+d+‘.txt‘);rewrite(output);
write(1);
close(output);
end;
end.