1) var a:string; i, o: Integer; p: Real; begin readln(o); a := inttostr(o); for i := 1 to length(a) do p := p + strtoint(a[i]); if (sqr(o) = p*p*p) then writeln('true') else writeln('false'); end.
2) var a:string; i, o, p: Integer; begin readln(o); a := inttostr(o); for i := 1 to length(a) do p := p + strtoint(a[i]); if (p mod 3 = 0) then writeln('true') else writeln('false'); end.
3) var a, b, c: real; begin readln(a, b, c); if ((a = b) and (b = c)) then writeln('true') else writeln('false'); end.
A) var a: string; i: integer; begin readln(a); for i := 1 to length(a) do if (a[i] <> UpCase(a[i])) then write(a[i], ' '); end.
b) var a: string; i, p: integer; q: boolean; begin readln(a); for p := 0 to 9 do for i := 1 to length(a) do if (a[i] = inttostr(p)) then q := true; writeln(q); end.
c) var a: string; i, p, u: integer; o: array [0..5] of char; begin readln(a); o[0] := '('; o[1] := ')'; o[2] := '{'; o[3] := '}'; o[4] := '['; o[5] := ']'; for p := 0 to 5 do for i := 1 to length(a) do if (a[i] = o[p]) then u := u + 1; writeln(u); end.
d) var a: string; i, p: integer; o: array [0..7] of char; begin readln(a); o[0] := '('; o[1] := ')'; o[2] := '?'; o[3] := '!'; o[4] := '"'; o[5] := '.'; o[6] := ','; o[7] := ','; for i := 1 to length(a) do for p := 0 to 7 do if (a[i] = o[p]) then writeln(a[i]); end.
var a:string;
i, o: Integer;
p: Real;
begin
readln(o);
a := inttostr(o);
for i := 1 to length(a) do
p := p + strtoint(a[i]);
if (sqr(o) = p*p*p) then writeln('true')
else writeln('false');
end.
2)
var a:string;
i, o, p: Integer;
begin
readln(o);
a := inttostr(o);
for i := 1 to length(a) do
p := p + strtoint(a[i]);
if (p mod 3 = 0) then writeln('true')
else writeln('false');
end.
3)
var a, b, c: real;
begin
readln(a, b, c);
if ((a = b) and (b = c)) then writeln('true')
else writeln('false');
end.
Всё проверено, удачи:)
var a: string;
i: integer;
begin
readln(a);
for i := 1 to length(a) do
if (a[i] <> UpCase(a[i])) then
write(a[i], ' ');
end.
b)
var a: string;
i, p: integer;
q: boolean;
begin
readln(a);
for p := 0 to 9 do
for i := 1 to length(a) do
if (a[i] = inttostr(p)) then
q := true;
writeln(q);
end.
c)
var a: string;
i, p, u: integer;
o: array [0..5] of char;
begin
readln(a);
o[0] := '('; o[1] := ')'; o[2] := '{'; o[3] := '}'; o[4] := '['; o[5] := ']';
for p := 0 to 5 do
for i := 1 to length(a) do
if (a[i] = o[p]) then
u := u + 1;
writeln(u);
end.
d)
var a: string;
i, p: integer;
o: array [0..7] of char;
begin
readln(a);
o[0] := '('; o[1] := ')'; o[2] := '?'; o[3] := '!'; o[4] := '"'; o[5] := '.'; o[6] := ','; o[7] := ',';
for i := 1 to length(a) do
for p := 0 to 7 do
if (a[i] = o[p]) then
writeln(a[i]);
end.
Ну вот:) О, мой мозг, как же тебе досталось! ~_~