Глебик, вот пахалка:
Первая:
type
Test = record
Vopros: String[50];
Typ: Integer;
Kolotv: byte;
KolotvCor: byte;
Variants: array [1..100] of string[40];
Kolonky1: array [1..100] of string[40];
Kolonky2: array [1..100] of string[40];
Otvety: array [1..100] of string[40];
Prav: array [1..100] of string[40];
end;
label 10;
var
count,i,i1,i2,countall,i3,i4,i5,i6,i7,i8: Integer;
pravil,koll,variantsByte: byte;
s: string[40];
T: Test;
F: file of Test;
begin
i4:=0;
Assign(F,'ban.dat');
Rewrite(F);
writeln('Vvedite dannue: ');
writeln('Skoko voprosov budet?');
readln(countall);
for i3:=1 to countall do begin
writeln('Vopros: ',i3);
readln(T.Vopros);
writeln('Typ:');
writeln('1 - Neposredstvenny,2 - OneInMany,3 - ManyInMany,4 - Conformable,5 - Sortirovka');
readln(T.Typ);
if T.Typ = 5 then goto 10;
if T.Typ = 4 then goto 10;
writeln('Kolychestvo otvetov:');
readln(T.Kolotv);
for i1:= 1 to T.Kolotv do
begin
writeln('Otvet nomer ',i1);
readln(T.Otvety[i1]);
end;
10: case T.Typ of
1: begin writeln('Skoko prav otvetov?'); readln(pravil); for i2:=1 to pravil do begin writeln('Pravel otvet nomer ',i2);
readln(T.Prav[i2]); end; end;
2: begin writeln('Prav otvet: '); readln(T.Prav[1]); end;
3: begin writeln('Skoko prav otvetov?'); readln(pravil); for i2:=1 to pravil do begin writeln('Pravel otvet nomer ',i2);
readln(T.Prav[i2]); end; end;
4: begin writeln('Skoko kolonok?'); readln(koll); for i5:=1 to koll do begin writeln('Kolonka 1 variant ',i5);
readln(T.kolonky1[i5]); end; for i6:=1 to koll do begin writeln('Kolonka 2 variant ',i6);
readln(T.kolonky2[i6]); end; for i7:=1 to koll do begin writeln('Prav otvet ',i7,'?'); readln(T.Prav[i7]); end; end;
5: begin writeln('Skoko variantov?'); readln(variantsByte); for i8:=1 to variantsByte do begin writeln('Variant ¹',i8);
readln(T.Variants[i8]); end; writeln('Prav otvet?'); readln(T.prav[1]); end;
end;
i4:=i4+1;
Write(F,T);
end;
Вторая:
type
Test = record
Vopros: String[50];
Typ: Integer;
Kolotv: byte;
KolotvCor: byte;
Variants: array [1..100] of string[40];
Kolonky1: array [1..100] of string[40];
Kolonky2: array [1..100] of string[40];
Otvety: array [1..100] of string[40];
Prav: array [1..100] of string[40];
end;
var
i,i2,i3,i4,i5,int,int2: integer;
labell: byte;
s,s2,s3,otvet: string;
ArrStrPrav: array [1..100] of string;
F: file of Test;
T: Test;
begin
i:=0;
i3:=0;
i4:=0;
i5:=0;
writeln('Reading...');
assign(F,'ban.dat');
Reset(F);
while not Eof(F) do begin
i:=i+1;
Read(F,T);
end;
Close(F);
assign(F,'ban.dat');
Reset(F);
for i2:=1 to i do begin
Read(F,T);
writeln('Vopros ',i2);
writeln(T.Vopros);
case T.Typ of
1: begin repeat i3:=i3+1; s:=T.Prav[i3]; ArrStrPrav[i3]:=s; until s='';
readln(otvet);
for int:=1 to i3-1 do begin if otvet=ArrStrPrav[int] then begin
writeln('Otvet pravelen!'); labell:=0; end else labell:=labell+10; Continue; end;
if labell=10*(i3-1) then writeln('Otvet neveren!!'); end;
2: begin readln(otvet); if otvet=T.Prav[1] then writeln('Otvet veren!') else
writeln('Otvet neveren!'); end;
3: begin repeat i3:=i3+1; s:=T.Prav[i3]; ArrStrPrav[i3]:=s; until s='';
readln(otvet);
for int:=1 to i3-1 do begin if otvet=ArrStrPrav[int] then begin
writeln('Otvet pravelen!'); labell:=0; end else labell:=labell+10; Continue; end;
if labell=10*(i3-1) then writeln('Otvet neveren!!'); end;
4: begin writeln; writeln('Kolonka 1'); repeat i3:=i3+1; s:=T.kolonky1[i3]; writeln(s);
until s=''; writeln('Kolonka 2'); repeat i4:=i4+1; s2:=T.kolonky2[i4]; writeln(s2);
until s2=''; repeat i5:=i5+1; readln(otvet); ArrStrPrav[i5]:=otvet; s3:=T.Prav[i5];
until s3=''; for int2:=1 to i5-1 do begin if ArrStrPrav[int2]=T.Prav[int2] then begin
labell:=0; end else labell:=10; if labell=0 then begin writeln('Verno!!!');break; end
else writeln('Neverno!'); break; end; end;
5: begin repeat i3:=i3+1; s:=T.Variants[i3]; writeln(s); until s=''; readln(otvet);
if otvet=T.Prav[1] then writeln('Pravilno!') else writeln('Nepravilno!'); end;
end;
end;
readln
P.S. Label 10 - это метка для оператора безусловного перехода goto.