Answer the question
In order to leave comments, you need to log in
How to solve this "bug" with loop and array?
program test;
var
c,i,n:integer;
t:string;
testdata:array[1..5,1..5] of string;
Begin
Writeln('1 - Создать тест');
Writeln('2 - Тесты');
write('Мой выбор: ');
read(c);
Case c of
1:
begin
n:=1;
i:=1;
writeln('');
while i<5 do
begin
write(n,' вопрос: ');
readln(testdata[1,n]);
write('А)');
readln(testdata[2,n]);
i:=i+1;
n:=n+1;
end;
end;
end;
End.
Answer the question
In order to leave comments, you need to log in
maybe you made a mistake with the read command - the command for reading a file
ReadLn(S);
WriteLn('Вы ввели : ', S);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question