|
P.6.1.
program pr;
var x, y, z : integer;
begin
readln(x);
readln(y);
z:=x+y;
writeln(z);
end.
P.6.2.
program pr;
var x, y : integer;
begin
readln(x);
readln(y);
writeln(y);
writeln(x);
end.
P.6.3.
program pr;
var
x, y : integer;
b : boolean;
begin
readln(x);
readln(y);
b:=(x=y);
writeln(b);
end.
P.6.4.
program pr;
var
x, y, z : integer;
begin
readln(x);
readln(y);
if (x>y) then z:=x
else z:=y;
writeln(z);
end.
P.6.5.
program pr;
var
x, y, z : integer;
begin
readln(x);
readln(y);
if (x>y) then z:=x*y
else z:=x+y;
writeln(z);
end.
P.6.6.
program pr;
var
x, n : integer;
begin
x:=7;
for n:=1 to 100 do writeln(x);
end.
P.6.7.
program pr;
var
n : integer;
begin
for n:=1 to 100 do writeln(n);
end.
P.6.8.
program pr;
var
s, n : integer;
begin
s:=0;
for n:=1 to 100 do s:=s+n;
writeln(s);
end.
P.6.9.
program pr;
var
s, n, x : integer;
begin
s:=0;
for n:=1 to 10 do
begin
readln(x);
s:=s+x;
end;
writeln(s);
end.
P.6.10.
program pr;
var
s, n : integer;
begin
s:=0;
for n:=100 to 200 do s:=s+n;
writeln(s);
end.
P.6.11.
program pr;
var
s, n : integer;
begin
s:=0;
for n:=1 to 10 do
if n mod 2=1 then s:=s+n;
writeln(s);
end.
|