На PascalABC.NET
Первый столбик:
1) 5
2) Y=490
3) 1612
4) 24-1210
Второй столбик:
1) Результат=244
(В первом ошибка в задании была, перед else стоит ";")
2) При X=-5Y=2
3) -641.7
4) -56
(Тут тоже ошибки в задании: перед else стоит ";" и после не стоит ";"
#include <iostream>
using namespace std;
int main()
{
int a;
cin >> a;
int res = a * 45;
for (int i = 1; i < a; i++)
{
if (i % 2 == 0)
res += 15;
else
res += 5;
}
cout << 9 + res / 60 << " " << res % 60 << endl;
return 0;
}
Вот, на картинке вроде все подписано
<h2><u>if5 </u></h2>
program raf105;
uses robot;
begin
task('if5');
if (wallfromdown) or (wallfromup)
then begin left; paint; right; right; paint; left;
end;
if (wallfromleft) or (wallfromright)
then begin up; paint; down; down; paint; up;
end;
end.
<h2><u>if6 </u></h2>
program raf105;
uses robot;
begin
task('if6');
up;
if cellispainted
then begin down; down; paint; end
else begin down; down;
if cellispainted
then begin up; up; paint; end
else begin up; left;
if cellispainted
then begin right; right; paint; end
else paint;
end;
end;
end.
<h2><u>if7 </u></h2>
program raf105;
uses robot;
begin
task('if7');
if wallfromright and wallfromdown
then begin up; left; paint; end;
if wallfromleft and wallfromdown
then begin up; right; paint; end;
if wallfromup and wallfromleft
then begin right; down; paint; end;
if wallfromup and wallfromright
then begin down; left; paint; end
end.
Const n=8;
var x:array[1..n] of real;
i:integer; min:real;
begin
for i:=1 to n do
begin
write('x[',i,']=');
readln(x[i]);
end;
min:=x[1];
for i:=2 to n do
if x[i]<min then min:=x[i];
for i:=1 to n do
if x[i]<0 then x[i]:=min;
for i:=1 to n do write(x[i],' ');
writeln;
<span>end.
</span>