Kod: Zaznacz cały
Nazwisko Imie Pesel
Kod: Zaznacz cały
program zad2;
uses crt;
const n=100;
type
rosoba=RECORD
nazwisko :string[20];
imie :string[20];
END;
tosoba=ARRAY[1..100] of rosoba;
var
dane1, dane2, dane3 :text;
j :byte;
tab :tosoba;
c :char;
str :string[20];
BEGIN
clrscr; c:='x'; j:=1;
Assign(dane1,'d:\dane1.txt');
Assign(dane2,'d:\dane2.txt');
Assign(dane3,'d:\dane3.txt');
Reset(dane1); Reset(dane2); Rewrite(dane3);
WHILE (not(eoln(dane1))) and (c<>' ') DO
begin
read(dane1,c);
tab[1].nazwisko[j]:=c;
j:=j+1;
end;
writeln(tab[1].nazwisko);
readln;
END.