maksderbenevMarc
12.02.2022 08:02

Задача №3. Надрукувати на екрані таблицю Піфагора. а
2
4
л л
9
4
СО СО
1
2
В
00 V AWNA
Со ову у
3
3
6
9
12
15
18
21
24
27
5
6
7
8
5
б
10
12
14
16
18
8
12
16
20
24
28
32
36
10
15
20
25
30
35
40
45
6
6
12
18
24
30
36
42
48
54
7
7
14
21
28
35
42
49
56
63
16
24
32
4e
48
56
64
72
9
18
27
36
45
54
63
72
81
9
Process returned a(0x0)
Press any key to continue.
execution time: 0.268 S s​

Нажмите на рекламу ниже и сразу увидите ответ
Популярные вопросы:
Ответ:
literaturas
10.11.2021 09:02

пример программы для паскаль

Program a;

const n = 50;
var
i:byte;
B:array[1..n] of word;
procedure proc(A:array of word);
begin
for i:=1 to n do
if((129 <= A[i]) and (A[i] <= 160)) or    
((161 <= A[i]) and (A[i] <=175)) or     
((225 <= A[i]) and (A[i] <= 242)) then
Writeln('index =  ',i+1,'; bukva - ''',char(A[i]),,'  A[i] = ',A[i]);
end;

Begin
writeln;
for i:=1 to n do       
B[i] := random(300);
for i:=1 to n do Begin         
write(' ',i,' = ',B[i]);
if (i mod 5 = 0) then writeln;
end;
writeln;
writeln;
proc(B);          
readln;

end.

0,0(0 оценок)
Ответ:
myagkixmatveeva
12.10.2022 16:06

uses GraphABC;

type FUN = function (x: real): real;

function f(x: real): real;
begin
f:=0.5*x*cos(2*x);
end;

// l (logical) - логические координаты
// s (screen) - физические координаты
procedure drawGraph(x1,x2,y1,y2: real; f: FUN);
var
xl,xl0,wl,yl,yl0,hl: real;
xs0,ws,ys0,hs: integer;
function LtoSx(xl: real): integer;
begin
Result:=round(ws/wl*(xl-xl0)+xs0);
end;
function LtoSy(yl: real): integer;
begin
Result:=round(hs/hl*(yl-yl0)+ys0);
end;
function StoLx(xs: integer): real;
begin
Result:=wl/ws*(xs-xs0)+xl0;
end;
var xi: integer;
begin // drawGraph
xs0:=0; ys0:=WindowHeight;
ws:=WindowWidth;
hs:=WindowHeight;
xl0:=x1;
yl0:=y1;
wl:=x2-x1;
hl:=-(y2-y1);
MoveTo(xs0,LtoSy(f(StoLx(xs0;
for xi:=xs0+1 to xs0+ws do
LineTo(xi,LtoSy(f(StoLx(xi;
end;

begin // program
SetWindowCaption('График функции');
drawGraph(-12,12,-23,23,f);
end.

0,0(0 оценок)
Полный доступ
Позволит учиться лучше и быстрее. Неограниченный доступ к базе и ответам от экспертов и ai-bota Оформи подписку
logo
Начни делиться знаниями
Вход Регистрация
Что ты хочешь узнать?
Спроси ai-бота