help me to find the mistake in my program
Послано
Brenda 12 ноя 2002 20:36
program xt;
const use :array[0..6] of integer
=(3241,1324,1234,2341,1243,1342,2134);
var a,p :extended;
n,i,pp,t,k,po :integer;
j :char;
s :string;
begin
readln(n);
for i:=1 to n do
begin
readln(s);
for j:='1' to '4' do
begin
po:=pos(j,s);
delete(s,po,1);
end;
a:=0; t:=0;
for k:=1 to length(s) do
if s[k]<>'0' then a:=a*10+(ord(s[k])-48)
else inc(t);
if a<>0 then write(a:0:0);
p:=a-7*int(a/7);
pp:=trunc(p);
write(use[pp]);
for k:=1 to t do write('0');
writeln;
end;
end.