<h2><u>if8 </u></h2>
program raf105;
uses robot;
var l,d,r,u: boolean;
begin
task('if8');
l:= wallfromleft;
d:= wallfromdown;
r:= wallfromright;
u:= wallfromup;
if l
then begin right; paint; right; paint;
if freefromright
then begin right; paint; end
end;
if d
then begin up; paint; up; paint;
if freefromup
then begin up; paint; end
end;
if r
then begin left; paint; left; paint;
if freefromleft
then begin left; paint; end
end;
if u
then begin down; paint; down; paint;
if freefromdown
then begin down; paint; end
end;
end.
<h2><u>if9 </u></h2>
program raf105;
uses robot;
var l,r: boolean;
begin
task('if9');
right; r:= wallfromdown;
left;
left; l:= wallfromup;
right;
if r and l
then begin up; paint; down; down; paint; up; end
else paint;
end.
<h2><u>if10 </u></h2>
program raf105;
uses robot;
var l,r: boolean;
begin
task('if10');
right; r:= cellispainted;
left;
left; l:= cellispainted;
right;
if r or l
then begin up; paint; end
else paint;
end.
1
var i, minus, plus, zero: integer;
t: array [1..15] of integer;
begin
minus := 0;
plus := 0;
zero := 0;
for i := 1 to 15 do
begin
readln(t[i]);
if t[i] > 0 then plus := plus + 1;
else if t[i] < 0 then minus := minus + 1;
else zero := zero + 1;
end;
end.
2
var stroke: string;
begin
readln(stroke);
if length(stroke) mod 2 = 0 then writeln('Четно');
else writeln('Нечетно');
end.
3 (Сейчас далеко от компа, когда буду рядом отредачу)
4
var max, min, i: integer;
A: array[1..20] of integer;
begin
min := a[1];
max := a[1];
for i := 2 to 15 do
begin
if a[i] > max then max := a[i];
if a[i] < min then min := a[i];
end;
end.
Ну несложно же... пару минут от силы на задачу.
На какое устройство
в какую папку
кому
какой раздел сайта
Uses crt;
var a : array [1..10, 1..10] of integer ;
i,j,n,m:byte;
min,s:integer;
begin
s:=1;
randomize;
writeln('Введи кол-во строк(<10)');
readln(n);
writeln('Введи кол-во столбцов(<10)');
readln(m);
for j:=1 to m do
for i:=1 to n do begin
a[i,j]:=random(100);
gotoxy((i-1)*5+1,j+5);
writeln(a[i,j]);
end;
for i:=1 to m do begin
min:=a[1,i];
for j:=1 to n do if a[j,i]<min then min:=a[j,i];
gotoxy((i-1)*3+1,i+12);
write('min в ',i,' строке равен ',min);
s:=min*s;
end;
gotoxy(1,23);
writeln(s);
<span>end.</span>