В произвольно заданном одномерном1.

1
Ответов - 1
В произвольно заданном одномерном1.

Вопрос задал ученик
Категории: Информатика

Ответы


Гость
1.
var
a: array [0..12] of integer;
i, k: byte;
min: integer;
begin 
Randomize; 
for i:=0 to 12 do 
begin 
a[i]:=random(15)-4; 
write(a[i]:4); 
end; 
min:=a[0]; 
for i:=1 to 12 do 
if a[i] < min then     
begin       
min:=a[i];       
k:=i;     
end; 
writeln; 
writeln('Min v pozicii ', k, ' = ', a[k]); 
readln;
end.

2.

var
a: array [1..6] of integer;
i: byte;
begin
for i:=1 to 6 do
begin 
write(i, ' = '); 
readln(A[i]);
end;
writeln;
for i:=1 to 6 do
begin 
if i mod 2 = 0 then A[i]:=0; 
write(A[i], ' ');
end;
readln;
end.
Добавить ответ
Похожие вопросы
Топ Комментарии Архив
Van пишет:
Hi there i am kavin, its my first occasion to commenting anywhere, when i read this piece of writing i thought i could
Danial пишет:
My coder is trying to convince me to move to .net from PHP. I have always disliked the idea because of the costs. But
Chi пишет:
I love what you guys are usually up too. This kind of clever work and reporting! Keep up the wonderful works guys I've
Mathew пишет:
Hi friends, how is everything, and what you would like to say about this piece of writing, in my view its in fact
«    Декабрь 2021    »
ПнВтСрЧтПтСбВс
 12345
6789101112
13141516171819
20212223242526
2728293031 
Теги