Первая программа:
program n1;
var a: array[1..10] of integer;
i,k:integer;
begin
for i:=1 to 10 do a[i]:=random(100);
K:=0;
For i:=1 to 10 doIf a [i]> 50 then k:=k+1;
Write ('k=', k);
end.
Вторая программа:
program n1;
var a: array[1..10] of integer;
i,s:integer;
begin
for i:=1 to 10 do a[i]:=random(100);
s:=0;
for i:=1 to 10 doif (a [i]>50) and (a [i]<60) then s:=s+a [i];
write ('s=', s);
end.
Var
x:integer;
begin
readln(x);
writeln(5*x+5*x/5+x);
end.
<h2>PascalABC.NET 3.4.2, сборка 1978 (12.02.2019)
</h2>
- program task31143948;
- const
- N = 12;
- var
- arr: array[1..N] of real;
- Sum: real;
- begin
- Sum := 1;
- for var i := 1 to N do
- begin
- arr[i] := Random()*4 - 1;
- Writeln(arr[i]:5:2);
- if arr[i] < 0 then
- Sum := Sum * arr[i]
- end;
- if Sum = 1 then
- Write('ПРОИЗВЕДЕНИЕ = 0')
- else
- Writeln('ПРОИЗВЕДЕНИЕ = ', Sum:5:2);
- end.
N=2^8= 256 кодов
_________________
var
i,m,n: longint;
begin
write('Введите через пробел границы интервала: ');
readln(m,n);
for i:=m to n do
writeln(i,' ',i*i,' ',i*i*i);
end.