.
-.
, , ( ).
- .
, , , , .
.
( , , ) ( , ). : txt, Windows ( !) txt , , input.txt, : input.txt.txt.
Total Commander (Windows Commander): Shift+F4, , , .
FreePascal. , , , File Save as , (: input.txt) . , .
! !
! .
( ).
?
. , , File-Change dir .
! . ( PascalABC) pas ! , !
exe , exe .
: exe , ( ) , .
! , , ( , , , )!
|
|
, , :
- .
( ):
var f:text;
, :
assign (f,input.txt);
f input.txt ( ).
, , . , . !
.
( f ):
reset (f); - .
readln (f,t); read (f,t); - t, , () . read readln ( ). , , read, , . , readln , .
, :
14 17 235
15 2 191
2 1 3
:
read(f,a); read(f,b); read(f,c); read(f,d); writeln(a,' ',b,' ',c,' ',d);
: 14 17 235 15
:
readln(f,a); readln(f,b); read(f,c); read(f,d); writeln(a,' ',b,' ',c,' ',d);
: 14 15 2 1
close (f); - . , , . !
( f ):
rewrite (f); - . , , .
write (f,t); writeln (f,t); - . , () .
close (f); - . !
: N (N<=1000, <=50000). text.in, N, . text.out. .
, text.in, N (, 5, ), , 50000. . :
|
|
: , . , ( ), - () , - , !!!
- -.
( input) (output) .
, . :
N (N<=1000, <=50000). text.in, N, . text.out. .
program prim;var n,i:integer; t:longint; s:real;begin assign(input,'text.in'); { } reset(input); { } readln(n); { n } s:=0; for i:=1 to n do begin readln(t); { t } s:=s+t; end; close(input); { } s:=s/n; assign(output,'text.out'); { } rewrite(output); { } writeln(s:0:2); { } close(output); { }end., read, readln, write, writeln .
- . - .
- .
1. . . . , . 3 . .