Предмет: Информатика, автор: timoxin97

помогите пожалуйста решить 3 задание

Приложения:

Ответы

Автор ответа: petyaGavrikov
0
const n=10;
var x,y:array[1..n] of real;i,j:integer;
begin
Randomize;
writeln('--X--');
for i:=1 to n do
 begin
 x[i]:=4*random-2;
 write(x[i]:5:2,' ');
 end;
writeln;
j:=0;
for i:=1 to n do
  if (x[i]>-1)and(x[i]<1) then
   begin j:=j+1; y[j]:=x[i]; end;
writeln('--Y--');
for i:=1 to j do write(y[i]:5:2,' ');
writeln;
end.

Пример:
--X--
-1.80  0.37 -0.87 -1.32 -0.21  1.61  1.50  1.01 -0.03  0.58 
--Y-- 
0.37 -0.87 -0.21 -0.03  0.58 

Автор ответа: timoxin97
0
первое помогите
Похожие вопросы
Предмет: Английский язык, автор: nastagarifullina105
6 Rewrite the sentences with the words in brackets. Decide if you need one or two sentences.

1 My brother is hard-working. He can’t find a well-paid job. (although)

________________________________________________________________________

2 The film was really gripping. She fell asleep. (even though)

________________________________________________________________________

3 She works long hours. She always finds time to do sport. (although)

________________________________________________________________________

4 It’s a low-paid job. I love working with the animals. (nevertheless)

________________________________________________________________________

5 He’s a doctor. He’s terrible at communicating with people. (even though)

________________________________________________________________________

6 I can’t speak French. I want to work in France this summer. (however)

________________________________________________________________________

7 Liam failed his driving test. He can take it again next month. (however)

________________________________________________________________________

8 I went for two job interviews. I didn’t get a job. (although)

________________________________________________________________________

9 It takes an hour to get to school by bus. All my friends go there. (nevertheless)

________________________________________________________________________

10 My sister loves her job. She still finds it very stressful. (nevertheless)

________________________________________________________________________