Var ar:array[1..10] of integer;
i:integer;
begin;
for i:=1 to 10 do
begin;
write('Введите ',i,' элемент массива:');
readln(ar[i]);
if ar[i]<0 then ar[i]:=abs(ar[i]);
end;
writeln('Final array:');
for i:=1 to 10 do
write(ar[i]:4);
<span>end.</span>
105(10) = 1101001(2)
358(10) = 101100110(2)
377(10)<span> = 101111001(</span><span>2)</span>
Cpp:
For (int i = 0; i < кол-во элементов; i++){
If (mas [i] >= 0){
mas [i] = 0;
}
else{
mas [i] = mas [i] * mas [i];
}
Var
a,s:integer;
begin
s:=0;
repeat
readln(a);
s:=s+a;
until a=0;
writeln('Сумма чисел: ',s);
<span>end</span>