- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 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
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
type BOOK= record
Name:string[20];
Avtor:string[20];
Price:integer;
end;
BOOKS=Array[1..100] of BOOK;
F= File of BOOK;
procedure Vvod(var biblioteka: books; var File_tBIBL:F; var n:integer);
Procedure AVTOR_KN(VAR File_tBIBl:F; VAR File_tBIBl_AVTOR:text);
Procedure TIP_TEXT(VAR File_tBIBl:F; VAR File_tBIBl_text:text);
Function MIN_CENA( var File_tBIBl:F ; n:integer ):integer;
procedure Vvod(var biblioteka: books; var File_tBIBL:F; var n:integer);
var i:integer;
begin
rewrite(File_tBIBL);
FOR i:=1 to n do begin
Writeln(' Vvedite nazvanie knigi');
readln(biblioteka[i].Name);
Writeln(' Vvedite avtora');
readln(biblioteka[i].Avtor);
Writeln(' Vvedite cenu');
readln(biblioteka[i].Price);
Write(File_tBIBL,biblioteka[i]);
writeln;
end;
close(File_tBIBL);
end;
Procedure TIP_TEXT(VAR File_tBIBl:F; VAR File_tBIBl_text:text);
var BIBLIOTEKA:BOOk;
BEGIN
reset(File_tBIBl);
rewrite(File_tBIBl_text);
WHILE not eof(File_tBIBl) do begin
read(File_tBIBl,BIBLIOTEKA);
writeln(File_tBIBl_text,BIBLIOTEKA.Name);
writeln(File_tBIBl_text,BIBLIOTEKA.Avtor);
writeln(File_tBIBl_text,BIBLIOTEKA.Price);
writeln(File_tBIBl_text);
writeln(File_tBIBl_text);
end;
close(File_tBIBl);
close(File_tBIBl_text);
end;
Procedure AVTOR_KN(VAR File_tBIBl:F; VAR File_tBIBl_AVTOR:text);
var BIBLIOTEKA:BOOk; Av:string;
BEGIN
reset(File_tBIBl);
rewrite(File_tBIBl_AVTOR);
Writeln('Vvedite iskomogo avtora');
readln(Av);
WHILE not eof(File_tBIBl) do begin
read(File_tBIBl,BIBLIOTEKA);
if BIBLIOTEKA.Avtor = Av then begin
writeln(File_tBIBl_AVTOR,BIBLIOTEKA.Name);
writeln(File_tBIBl_AVTOR,BIBLIOTEKA.Avtor);
writeln(File_tBIBl_AVTOR,BIBLIOTEKA.Price:4);
writeln(File_tBIBl_AVTOR);
end;
end;
close(File_tBIBl);
close(File_tBIBl_AVTOR);
end;
var nomer,i,min:integer;BIBLIOTEKA:BOOks; SIZE:integer;
begin
reset(File_tBIBl);
size:=1;
while not eof(File_tBIBl) do
with BIBLIOTEKA[size] do
begin
readln(File_tBIBl , BIBLIOTEKA.name);
Readln(File_tBIBl,BIBLIOTEKA.Avtor);
readln(File_tBIBl,BIBLIOTEKA.Price);
inc(size);
end;
dec(size);
min:=BIBLIOTEKA[1].Price;
for i:=1 to size do
if BIBLIOTEKA[i].Price< min then begin
min:=BIBLIOTEKA[i].Price;
nomer:=i;
end;
Try 27.02.2011 12:46 # 0
Lure Of Chaos 27.02.2011 12:56 # 0
TarasB 27.02.2011 13:39 # +2
ZX_Spectrum 27.02.2011 23:56 # +3
bugmenot 28.02.2011 00:17 # +1
ZX_Spectrum 28.02.2011 00:46 # 0
g00d 01.03.2011 02:04 # 0
CO3HAHUE 11.12.2011 21:20 # 0
Но мне бы такие места открутил препод за подобный код.