1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
program anniv;
uses crt;
type birthday = record
Name : string;
Year : string;
end;
var c : string;
var fiche : birthday;
var f : File of birthday;
var i : integer;
begin
Assign(f, 'birth.txt');
rewrite (f);
ClrScr;
c := 'yes';
while c = 'yes' do begin
with fiche do begin
writeln ('enter the name');
readln(Name);
writeln ('enter the year');
readln(year);
end;
writeln ('Do you want to record again? say yes or no');
readln (c);
end;
write (f,fiche);
reset (f);
read (f,fiche);
readln;
end. |
Partager