Dalatus
4 год назад
Информатика Паскаль пжжжжжжжж 15. бллов дам!
ОТВЕТЫ
Ostap
Oct 24, 2020
Объяснение:
program ArrayX;
var
x : array [1..10] of integer;
i, qty : integer;
begin
qty:=0;
for i:= 1 to 10 do begin
x[i] := random(20)-10;
if x[i] > 2 then qty := qty+1;
writeln('x[',i,'] = ',x[i]);
end;
writeln('Qty of x>2 = ',qty);
end.
===================
Free Pascal Compiler version 2.6.2-8 [2014/01/22] for x86_64
Copyright (c) 1993-2012 by Florian Klaempfl and others
Target OS: Linux for x86-64
Compiling main.pas
Linking a.out
18 lines compiled, 0.2 sec
/usr/bin/ld.bfd: warning: link.res contains output sections; did you forget -T?
x[1] = 0
x[2] = 1
x[3] = 4
x[4] = 6
x[5] = 2
x[6] = 7
x[7] = 0
x[8] = 6
x[9] = -2
x[10] = 2
Qty of x>2 = 4
...Program finished with exit code 0
Press ENTER to exit console.
972