assign(f,'<_>'); f , .
. ,
assign(f,'input.txt'); ― f , , , , ,
assign(f,'output.txt'); ― f , .
'<_>' . , , . .
, , :
reset(f); ― ; , . ;
rewrite(f); ― ; , ; , ;
append(f); ― ( ). , ; , , .
, :
close(f);
, , .
, , read() readln(). , ― .
.
read(f,a,b,c); ― f a, b c. ;
readln(f,a,b,c); ― f a, b c, ("") ; -, "" .
, , readln() : , " " " ". " ".
|
|
, rewrite(f) append(f), write() writeln(). , , - :
write(f,a,b,c); ― f a,b c;
writeln(f,a,b,c); ― f a, b c, " ".
( TRUE FALSE) .
.
n- , .
Program matrica;
onst Nmax = 20;
Var A: Array [1..nmax, 1..nmax ] Of Real;
i,j,N,Nstr: Byte;
S,Smax: Real;
Begin
Writeln (' ( ',nmax,')');
Readln (n);
For i:=1 To N Do
Begin
Writeln (' ',i,'- ');
For j:=1 To N Do Read (A[i,j]);
S:=0;
For j:=1 To N Do S:=S + A[i,j];
If i=1 Then
Begin
Nstr:=1;
Smax:=S;
End
Else if S > Smax Then
Begin
Nstr:=i;
Smax:=s;
End;
End;
Writeln (' : ',nstr);
For j:=1 To N Do Write (A[nstr,j]:10:3);
Writeln;
End.
: , - . .
1, 9 | . |
2, 10 | . |
3, 11 | . |
4, 12 | . |
5, 13 | . |
6, 14 | . |
7, 15 | . |
8, 16 | . |
:
1. .
2. - .
3. ?
4. .
, , ; .