2. Найти сумму чисел массива в переменной Sum, а потом:<span> </span>
<span>Writeln('Сумма элементов массива чётное число = ', not odd(Sum));</span>
1.
<span>var</span> m<span>:</span><span>array</span><span>[</span><span>1</span>..<span>100</span><span>]</span><span>of</span><span>integer</span>;
i<span>,</span>a<span>,</span>n<span>:</span><span>integer</span>;
<span>begin</span><span>write</span><span>(</span><span>'Введите размерность массива: '</span><span>)</span>;<span>readln</span><span>(</span>n<span>)</span>;
<span>write</span><span>(</span><span>'Введите число А: '</span><span>)</span>;<span>readln</span><span>(</span>a<span>)</span>;
<span>writeln</span><span>(</span><span>'Введите массив: '</span><span>)</span>;
<span>for</span> i<span>:=</span><span>1</span><span>to</span> N <span>do</span><span>readln</span><span>(</span>m<span>[</span>i<span>]</span><span>)</span>;
<span>writeln</span><span>(</span><span>'Массив: '</span><span>)</span>;
<span>for</span> i<span>:=</span><span>1</span><span>to</span> N <span>do</span>
M<span>[</span>i<span>]</span><span>:=</span>m<span>[</span>i<span>]</span><span>-</span>a;
<span>for</span> i<span>:=</span><span>1</span><span>to</span> N <span>do</span><span>write</span><span>(</span>M<span>[</span>i<span>]</span><span>,</span><span>' '</span><span>)</span>;
<span>end</span>.
Потому что ее употребляют в различных коммуникациях.
Ошибка которая вызывает проблемы
Int n = 100;
List<Integer> ints = new ArrayList<Integer>();
for (int i = 0; i < n; i++) {
if (Math.abs(i) < 50) {
ints.add(i);
}
}
System.out.println(ints.size());
System.out.println(ints.toString());