Информатика 10 класс вот с этими таблицами ( как это правильно высчитывается? ) пропустил эту тему по болезни ( нифига не понимаю что нужно перемножать )
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
1 sm('Игорь',18,189).
2 sm('Роман',17,182).
3 sm('Антон',20,191).
4 sm('Виктор',21,185).
5 sm('Николай',16,193).
6 % а) выбрать всех спортсменов выше 184 (включительно), но не выше 190;
7 % ?- findall( Name, (sm(Name, Age, Height), Height >= 184, Height < 190), Xs ).
8 % б) выбрать спортсменов моложе 20 лет, но не моложе 18 (включительно);
9 % ?- findall( Name, (sm(Name, Age, Height), Age < 20, Age >= 18), Xs ).
10 % в) выбрать всех спортсменов с ростом не ниже 186 и не старше 19 лет (включительно).
11 % ?- findall( Name, (sm(Name, Age, Height), Height > 186, Age =< 19), Xs ).