You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
570 B
Plaintext
38 lines
570 B
Plaintext
6 years ago
|
program lotto2;
|
||
|
|
||
|
type
|
||
|
Ziehung = record
|
||
|
Datum: String;
|
||
|
Nums: Array[0..6] of Integer;
|
||
|
end;
|
||
|
|
||
|
var
|
||
|
f: File of Ziehung;
|
||
|
sin: String;
|
||
|
|
||
|
procedure get_for_date(date: String);
|
||
|
var
|
||
|
z: Ziehung;
|
||
|
i: Integer;
|
||
|
begin
|
||
|
while not EOF(f) do
|
||
|
begin
|
||
|
Read(f, z);
|
||
|
if (z.Datum = date) then
|
||
|
begin
|
||
|
Writeln('Results for ', date);
|
||
|
for i := 0 to 6 do
|
||
|
Write(z.Nums[i], ' ');
|
||
|
Writeln;
|
||
|
end;
|
||
|
end;
|
||
|
end;
|
||
|
|
||
|
begin
|
||
|
Assign(f, 'ziehung');
|
||
|
Reset(f);
|
||
|
Write('Date: ');
|
||
|
ReadLn(sin);
|
||
|
get_for_date(sin);
|
||
|
Close(f);
|
||
|
end.
|