witam:)
mam taki oto kodzik
uses crt;
type
student=record
imie,nazwisko:string[30];
nrinde:integer;
stypendium:real;
oceny:array[1..5] of byte;
end;
tab=array[1..10] of student;
var
stu: file of student;
osoba:student;
a:tab;
n:word;
procedure wprowadz(var n:word; osoba:student);
var
i,j:byte;
begin
for i:=1 to n do
begin
writeln('student nr' ,i); writeln;
with osoba do
begin
for j:=1 to 5 do
begin
writeln('ocena ',j); readln(osoba.oceny[j]);
end;
end;
end;
end;
procedure wyswietl(var n:word; osoba:student);
var
i,j:byte;
begin
for i:=1 to n do
begin
writeln('student ',i, ' ');
with osoba do
begin
for j:=1 to 5 do
begin
writeln('ocena ',j,'=',osoba.oceny[j]);
end;
end;
end;
end;
begin
clrscr;
writeln('ile student˘w'); readln(n);
wprowadz(n,osoba);
clrscr;
wyswietl(n,osoba);
assign(stu,'D:\student');
reset(stu);
write(stu,osoba);
readln;
close(stu);
end.
mam problem obawiam się ze nie zapisuje sie to porawnie do pliku oraz nie chce wypisac mi prawidłowo ocen na ekran