1. Program A1; var s,m:integer; begin Writeln('Vvedi vozrast SASHI :'); Read(s); Writeln('Vvedi vozrast MASHI :'); Read(m); If s>m then writeln('SASHA starshe MASHI') else writeln('MASHA starshe SASHI'); end.
2. Program A1; var s,m:integer; begin Writeln('Vvedi vozrast SASHI :'); Read(s); Writeln('Vvedi vozrast MASHI :'); Read(m); If s=m then writeln('SASHA i MASHA rovestniki') else If s>m then writeln('SASHA starshe MASHI') else writeln('MASHA starshe SASHI'); end.
3. Program A1; var a,b,c,d:real; begin Readln(a); Readln(b); Readln(c); If ((b<a) and (b<c)) then begin d:=a; a:=b; b:=d; end; If ((c<a) and (c<b)) then begin d:=a; a:=c; c:=d; end; If ((a>b) and (a<c)) then begin d:=b; b:=a; a:=d; end; If ((c<b) and (c>a)) then begin d:=b; b:=c; c:=d; end; If ((a>c) and (a>b)) then begin d:=c; c:=a; a:=d; end; If ((b>c) and (b>a)) then begin d:=c; c:=b; b:=d; end; writeln(a,'<',b,'<',c); end.
var
s,m:integer;
begin
Writeln('Vvedi vozrast SASHI :');
Read(s);
Writeln('Vvedi vozrast MASHI :');
Read(m);
If s>m then writeln('SASHA starshe MASHI') else writeln('MASHA starshe SASHI');
end.
2.
Program A1;
var
s,m:integer;
begin
Writeln('Vvedi vozrast SASHI :');
Read(s);
Writeln('Vvedi vozrast MASHI :');
Read(m);
If s=m then writeln('SASHA i MASHA rovestniki') else
If s>m then writeln('SASHA starshe MASHI') else writeln('MASHA starshe SASHI');
end.
3.
Program A1;
var
a,b,c,d:real;
begin
Readln(a);
Readln(b);
Readln(c);
If ((b<a) and (b<c)) then begin d:=a; a:=b; b:=d; end;
If ((c<a) and (c<b)) then begin d:=a; a:=c; c:=d; end;
If ((a>b) and (a<c)) then begin d:=b; b:=a; a:=d; end;
If ((c<b) and (c>a)) then begin d:=b; b:=c; c:=d; end;
If ((a>c) and (a>b)) then begin d:=c; c:=a; a:=d; end;
If ((b>c) and (b>a)) then begin d:=c; c:=b; b:=d; end;
writeln(a,'<',b,'<',c);
end.
var
x, y, t, c, n, k: integer;
a: array [1..10] of integer;
begin
for t := 1 to 10 do
a[t] := 0;
read(x, y);
t := x;
while (t <> 0) do
begin
c += 1;
t := t div 10;
end;
k := 1;
for t := 1 to c do
k *= 10;
while (x <> 0) do
begin
n := y;
t := x div k;
while (n <> 0) do
begin
c := n mod 10;
n := n div 10;
if (c = t) and (a[c + 1] = 0) then
begin
write(t, ' ');
a[c + 1] += 1;
break;
end;
end;
x := x mod k;
k := k div 10;
end;
end.