Код: Выделить всё
program zad;
var i,j,code:integer;
s,s1:string;
begin
readln(i);
str(i,s);
j:=1;
s1:='';
while (j<=Length(s)) do
begin
s1:=s[j]+s1;
inc(j);
end;
val(s1,i,code);
writeln(i);
end.
Код: Выделить всё
program zad;
var i,j,code:integer;
s,s1:string;
begin
readln(i);
str(i,s);
j:=1;
s1:='';
while (j<=Length(s)) do
begin
s1:=s[j]+s1;
inc(j);
end;
val(s1,i,code);
writeln(i);
end.
Код: Выделить всё
const
N=100;
var
words:array[1..N]of string;
w:array[1..N]of string;
cn,k:integer;
s:string;
wd:string;
i,j:integer;
index:integer;
count,co,col:integer;
cnt:integer;
wc:integer;
b,a,pr:boolean;
function ParceText(txt:string):integer;
var l,c:integer;
begin
c:=0;
pr:=false;
l:=length(txt);
for i:=1 to l+1 do
begin
if ((txt[i]<>' ')and(i<>l+1)) then
begin
wd:=wd+txt[i];
pr:=true;
end
else
begin
inc(c);
words[c]:=wd;
wd:='';
end;
end;
ParceText:=c;
end;
begin
writeln('Vvedite text:');
repeat
readln(s);
if s<>'$' then
begin
count:=ParceText(s);
co:=co+count;
end;
until s='$';
for i:=1 to co do
begin
cnt:=0;
for j:=1 to co do
if words[i]=words[j] then
inc(cnt);
if cnt>1 then
begin
index:=i;
end;
end;
for i:=1 to co do
begin
wc:=0;
for j:=1 to co do
if words[i]=words[j] then
inc(wc);
if wc>1 then
begin
b:=true;
for k:=1 to cn do
if w[k]=words[i] then
b:=false;
if b then
begin
inc(cn);
w[cn]:=words[i];
end;
end;
end;
if pr then
begin
if co<=10 then
begin
writeln('slova povtor bolee odnogo raza:');
for k:=1 to cn do
writeln(w[k]);
end
else
begin
writeln('obrabat 10 slov');
writeln('slova povtor bolee odnogo raza:');
for k:=1 to cn do
writeln(w[k]);
end;
end
else
writeln('text otsytstvyet');
end.