|
|
back to boardWhat's wrong with my program! var s:array[1..30] of byte; n,i,t:longint; begin read(n);i:=9;t:=31; if n=0 then begin writeln('10');halt;end else if n=1 then begin writeln('1');halt;end; while i<>1 do begin while n mod i=0 do begin dec(t); s[t]:=i; n:=n div i; end; dec(i); end; if n=1 then begin if n=-1 then write('-'); for i:=t to 30 do write(s[i]); writeln; end else writeln('?'); end. |
|
|