ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1209. 1, 10, 100, 1000...

Ошибка компиляции,PASCAL!
Posted by Yurij 11 Nov 2018 15:17
Variable "q" does not seem to be initialized
Variable "x" does not seem to be initialized

var a:array of integer;w,x,c:string;q,u,n,i:integer;
begin
read(n);setlength(a,n);
w:='10';c:='1';
for i:=0 to n-1 do
begin
read(a[i]);
if q<a[i] then q:=a[i];
end;
while length(c)<=q do
begin
str(w,x);
c:=c+x;
w:=w+'0';
end;
for i:=0 to n-1 do
begin
u:=a[i];
write(c[u],' ')
end;
end.
Re: Ошибка компиляции,PASCAL!
Posted by kor_romko 12 May 2019 03:03
You didn't initialize 'q' and 'x'.
There no 'q:=' or 'x:=' in the code