1) var n:integer; begin readln(n); if(n<0)then write(0) else write(n+4); end.
2) var a, b: integer; begin readln(a, b); if(a = b) then write(1) else write(0); end.
3) var a, b, c, s: integer; begin s := 0; readln(a, b, c); if(a >= 0) then s := s + 1; if(b >= 0) then s := s + 1; if(c >= 0) then s := s + 1; write(s); end.
4) var a, b, c, s: integer; begin s := 0; readln(a, b, c); if(a > 0) then s := s + a; if(b > 0) then s := s + b; if(c > 0) then s := s + c; write(s); end. 5) var a, b, c: integer; begin readln(a, b, c); if (a < b) then swap(a, b); if (a < c) then swap(a, c); if (b < c) then swap(b, c); write(a, ' ', b, ' ', c); end.
6) var n, k, s, i: integer; begin s := 0; readln(n, k); for i := 1 to n.ToString.Length do if(strtoint(n.ToString[i]) > k) then s := s + strtoint(n.ToString[i]); write(s); end.
7) var n, s, i: integer; begin s := 0; readln(n); for i := 1 to n do s := s + i; write(s); end.
9) var n, i: integer; begin readln(n); for i := n downto 1 do write(i); end.
12 var n, i: integer; s: real; begin s := 0; readln(n); for i := n downto 1 do s:=s+(0.1*i); write(s); end.
13) var n, i: integer; begin readln(n); for i := 1 to n do write(sqr(i), ' '); end.
14) var n, i, c: integer; begin i := 1; c := 0; readln(n); while (c <> n) do begin if(i mod 3 = 0) then begin write(i, ' ');c := c + 1; end; i := i + 1; end; end.
15) var n, i, a: integer; c: real; begin i := 1; c := 0; readln(n); for i := 1 to n do begin read(a); c := c + a; end; write(c / n) end.
16) var n, i, a: integer; begin i := 1; while true do begin read(a); if(a = 0) then break; n := n + 1; end; write(n) end.
Ответить на вопрос
Поделитесь своими знаниями, ответьте на вопрос:
Центральний процеси складається з Будь ласка до ть
var
n:integer;
begin
readln(n);
if(n<0)then write(0)
else write(n+4);
end.
2)
var
a, b: integer;
begin
readln(a, b);
if(a = b) then
write(1)
else
write(0);
end.
3)
var
a, b, c, s: integer;
begin
s := 0;
readln(a, b, c);
if(a >= 0) then s := s + 1;
if(b >= 0) then s := s + 1;
if(c >= 0) then s := s + 1;
write(s);
end.
4)
var
a, b, c, s: integer;
begin
s := 0;
readln(a, b, c);
if(a > 0) then s := s + a;
if(b > 0) then s := s + b;
if(c > 0) then s := s + c;
write(s);
end.
5)
var
a, b, c: integer;
begin
readln(a, b, c);
if (a < b) then swap(a, b);
if (a < c) then swap(a, c);
if (b < c) then swap(b, c);
write(a, ' ', b, ' ', c);
end.
6)
var n, k, s, i: integer;
begin
s := 0;
readln(n, k);
for i := 1 to n.ToString.Length do
if(strtoint(n.ToString[i]) > k) then s := s + strtoint(n.ToString[i]);
write(s);
end.
7)
var n, s, i: integer;
begin
s := 0;
readln(n);
for i := 1 to n do
s := s + i;
write(s);
end.
9)
var n, i: integer;
begin
readln(n);
for i := n downto 1 do
write(i);
end.
12
var
n, i: integer;
s: real;
begin
s := 0;
readln(n);
for i := n downto 1 do
s:=s+(0.1*i);
write(s);
end.
13)
var n, i: integer;
begin
readln(n);
for i := 1 to n do
write(sqr(i), ' ');
end.
14)
var
n, i, c: integer;
begin
i := 1;
c := 0;
readln(n);
while (c <> n) do
begin
if(i mod 3 = 0) then begin write(i, ' ');c := c + 1; end;
i := i + 1;
end;
end.
15)
var
n, i, a: integer;
c: real;
begin
i := 1;
c := 0;
readln(n);
for i := 1 to n do
begin
read(a);
c := c + a;
end;
write(c / n)
end.
16)
var
n, i, a: integer;
begin
i := 1;
while true do
begin
read(a);
if(a = 0) then break;
n := n + 1;
end;
write(n)
end.