Var f,s:text; st,sp:string; i:integer; c:char; begin assign(s,'text1.txt'); reset(s); while not Eof(s) do begin; readln(s,sp); st:=st+sp+chr(10)+chr(13); end; close(s); for i:=1 to length(st) div 2 do begin c:=st[i]; st[i]:=st[length(st)-i+1]; st[length(st)-i+1]:=c; end; assign(f,'text.txt'); rewrite(f); write(f,st); close(f); end.
Текст в файле text1.txt:
Simple text 1And another simple text 2New text
Текст в файле text.txt: txet weN2 txet elpmis rehtona dnA1 txet elpmiS
Var
f,s:text;
st,sp:string;
i:integer;
c:char;
begin
assign(s,'text1.txt');
reset(s);
while not Eof(s) do
begin;
readln(s,sp);
st:=st+sp+chr(10)+chr(13);
end;
close(s);
for i:=1 to length(st) div 2 do
begin
c:=st[i];
st[i]:=st[length(st)-i+1];
st[length(st)-i+1]:=c;
end;
assign(f,'text.txt');
rewrite(f);
write(f,st);
close(f);
end.
Текст в файле text1.txt:
Simple text
1And another simple text
2New text
Текст в файле text.txt:
txet weN2
txet elpmis rehtona dnA1
txet elpmiS
x
2
+
y
2
=
16
...
...
...
...
...
...
.
.
(
1
)
x + y = 4 (2)
rearrange (2) to y = 4 - x (could do x = 4 - y )
substitute y = 4 - x into (1)
hence:
x
2
+
(
4
−
x
)
2
=
16
⇒
x
2
+
16
−
8
x
+
x
2
=
16
and
2
x
2
−
8
x
+
16
−
16
=
0
⇒
2
x
2
−
8
x
=
0
factor and solve : 2x(x - 4 ) = 0
⇒
x
=
0
,
x
=
4
substitute these values into y = 4 - x , to find corresponding values of y.
x = 0 : y = 4 - 0 = 4 → (0 , 4)
x = 4 : y = 4 - 4 = 0 → (4 , 0 )
These are the points of intersection with the line x +y = 4 and the circle
x
2
+
y
2
=
16
Answer link
Объяснение: