|

JavaMatlabPhpHtmlJavaScriptCSSC#Delphi 1


Linux Unix AutoCAD 3D Access Orcad

.

.

, , .

.

.

.

(, , , , ..).
, / .

 

..

:

IZ = RECORD : IZ ;
IK1 : T1; IK ();
IK2 : T2; T - , .. -
. . .
IKN :TN; ( );
END; RECORD ;
RECORD-END .

 

Const n=25;
Type Date = Record
Year : integer; {}
Month : 1..12; {}
Day : 1..31; {}
End;
Student = Record
FIO : String[15]; {}
Dr : Date; { }
Str : String[20]; {}
b1,b2,b3,b4,b5 : 2..5; { }
End;
Vec = array[1..n] of Student;

Var EMS_43a, EMS_43a, EMS_43a :Vec;

 

.

, .
.
. , .

Type x=(Yes, No);
Student = Record
FIO : String[25]; {}
Mark : 2..5; {}
Variant :x;
Case x of
Yes : (Str : String[20]); {}
No : ( );
End;

 

. , . .. . .

.

.

:

EMS_43a[1].FIO :=;
EMS_43a[1].Dr.Day :=13;
EMS_43a[1].Dr. Month :=1;
EMS_43a[1].Dr. Year :=1986;

 

 

:
With <> do
OP;
With - ;
<> - ( );
do - ;
OP - ( );

 

/

/

For i:=1 to n do Read (EMS_43a[i].FIO, EMS_43a[i].Str)

For i:=1 to n do
With EMS_43a[i] do
Begin
Read (FIO);
Read (Str);
End;

 

18.1. sp_gr.txt -23. .

, rez.txt. .

 

sp_gr.txt

.. 5 5 4 3 4
.. 4 5 3 4 2
.. 5 5 4 2 4
p .. 3 4 3 2 5
.. 5 4 3 5 2
.. 4 5 2 4 4
.. 3 3 3 4 5
.. 5 4 3 4 5
.. 5 4 3 2 5
.. 5 3 4 3 5

 

(srbal.pas)

Program srbal;
{ }
Uses crt;
Const n=10; { }
Type st=Record
fam:string[15];
b1,b2,b3,b4,b5:2..5;
End;
vec = array[1..n] of st;
Var
KIT_23b :vec;
sb1,sbo,sb :real;
i :byte;
f1,f2 :text;
Begin
Clrscr;
Assign(f1,'sp_gr.txt'); Reset(f1);
Assign(f2,'rez.txt'); Rewrite(f2);
sbo:=0; sb1:=0;
For i:=1 to n do
Begin
sb:=0;
With KIT_23b[i] do
Begin
Read(f1,fam); Write(fam); Write(f2,fam);
Readln(f1,b1,b2,b3,b4,b5);
sb:=sb+(b1+b2+b3+b4+b5)/5;
Writeln(sb:4:2); Writeln(f2,sb:4:2);
sb1:=sb1+b1/n;
End;
sbo:=sbo+sb/n;
End;
Writeln;
Writeln('sbo=',sbo:4:2,' ':10,'sb1=',sb1:4:2);
Close(f1); Close(f2);
End.

 

:

() ( rez.txt)

.. 4.20
.. 3.60
.. 4.00
p .. 3.40
.. 3.80
.. 3.80
.. 3.60
.. 4.20
.. 3.80
.. 4.00

 



.. 4.20
.. 3.60
.. 4.00
p .. 3.40
.. 3.80
.. 3.80
.. 3.60
.. 4.20
.. 3.80
.. 4.00

sbo=3.84 sb1=4.40


18.2. -23 ( 4.0). rez.txt (. 1).

 

Program STIP;
{ }
uses CRT;
const n=10;
Type st=Record
FIO: string[15];
SB: real;
end;
vec = array [1..n] of st;
Var sp,sp1 :vec;
i,k,kst :integer;
f :text;
Procedure VVod (var st:vec);
{ }
Begin
For i:= 1 to n do readln (f,st[i].FIO,st[i].SB);
End;
Procedure Out(st:vec;var st1:vec; var ks:integer);
{ 4,5 }
Begin
k:=1;
for i:=1 to n do if st[i].sb >4.5 then
begin
st1[k]:=st[i]; ks:=k; k:=k+1;
end;
end;
Begin
assign (f,'inp2.txt'); reset (f);
clrscr;
Writeln(' ');
Writeln;
VVod (sp); Out(sp,sp1,kst);
For i:=1 to n do
Writeln (sp[i].FIO,' ', sp[i].SB:4:2);
Writeln (':':30);
Writeln(' 4,5 ');
For k:=1 to kst do Writeln (sp1[k].FIO,' ',sp1[k].SB:4:2);
Writeln (' 4,5 :',kst);
Writeln;
Readln;
End.

 

:

.. 4.20
.. 3.60
.. 4.00
p .. 3.40
.. 3.80
.. 3.80
.. 3.60
.. 4.20
.. 3.80
.. 4.00
:
4
.. 4.20
.. 4.00
.. 4.20
.. 4.00
4 :4

 

18.3. -23 ( 30.10.2004 .).

 

sp_gr.txt

.. 05 12 1986
.. 14 05 1985
.. 15 12 1985
p .. 31 10 1986
.. 11 04 1985
.. 14 05 1986
.. 30 10 1986
.. 22 09 1985
.. 29 12 1985
.. 17 10 1985

 

Program GOLOS;
{ . 31.10.2004 .}
uses CRT;
const n=10;
Type
Date=Record
Day :1..31;
Month :1..12;
Year :1980..1987;
end;
st=Record
FIO: string[15];
DR : Date;
end;
vec = array [1..n] of st;
Var sp,sp1 :vec;
i,kvo,k :byte;
f :text;
Procedure VVod (var st:vec);
{ }
Begin
For i:= 1 to n do
With st[i] do
begin
readln (f,FIO,DR.Day,DR.Month,DR.Year);
Writeln(FIO,DR.Day:4,DR.Month:4,DR.Year:6);
end;
End;
Procedure Out (st:vec;var st1:vec; Var kn:byte);
{ }
Begin
k:=1;
for i:=1 to n do if
(st[i].DR.Year<=1986)and
(st[i].DR.Month<=10)and
(st[i].DR.Day<=30) then
begin
st1[k]:=st[i]; kn:=k; k:=k+1;
End;
End;
Begin
assign (f,'sp_gr1.txt'); reset (f);
clrscr;
Writeln(' :':30);
Writeln;
VVod (sp); Out(sp,sp1,kvo);
Writeln (':':30);
Writeln (' :');
For k:= 1 to kvo do
With sp1[k] do Writeln(FIO,DR.Day:4,DR.Month:4,DR.Year:6);
Writeln (' => ',kvo);
Readln;
End.

 

:

:

.. 5 12 1986
.. 14 5 1985
.. 15 12 1985
p .. 31 10 1986
.. 11 4 1985
.. 14 5 1986
.. 30 10 1986
.. 22 9 1985
.. 29 12 1985
.. 17 10 1985
:
:
.. 14 5 1985
.. 11 4 1985
.. 14 5 1986
.. 30 10 1986
.. 22 9 1985
.. 17 10 1985
=> 6

: 14438

:





php mysql



C


 


? :

, ? Google !

 
 

© life-prog.ru .