lusine07
29.08.2021 20:49

Activity 1 chware for free
Session 5.5 The need for copyright
221
cachia has just bought a new laptop from All Computer Supplies. She knows that an operating system has been installed on the computer
at doesn't include any word processing, spreadsheet, database or presentation software. Junaid at All Computer Supplies has told her
mat he can obtain all the software she needs from a well-known company. A friend of Zaphira's has emailed her to say that she can copy his
gure the reply that Zaphira should send to her friend. Include:
the reason why she should not accept her friend's offer of a copy of the software
an explanation to her friend of how he should check that the software he has is genuine.​

Нажмите на рекламу ниже и сразу увидите ответ
Популярные вопросы:
Ответ:
Зара7878
30.03.2023 03:19

37

Объяснение:

В массиве n + 1 элемент (n = 10),

цикл выполняется n раз

В цикле переменная s увеличивается на A[i] - A[i+1] + 2

Прибавка на 2 даст суммарную прибавку 20, а вот прибавка элементов получится такая, все элементы кроме первого и последнего сложатся сначала со знаком "-", потом "+", и они будут равны 0, останется только A[0] - A[n]

Поскольку массив - возрастает, то эта прибавка - отрицательная, нам нужно сделать её как можно больше.

Для этого нужно, чтобы элементы массива отличались на 1,

например, 0, 1, 2, 3, ..., n

Тогда A[0] - A[n] = -n, т.е. -10

27 + 20 - 10 = 37

0,0(0 оценок)
Ответ:
pro100skill132
18.09.2022 14:08

const

 n = 25;

 

var

 a: array[1..n] of integer;

 k0, k, i, s: integer;

 p: real;

 

begin

 s := 0;

 p := 1;

 k := 0;

 k0 := 0;

 for i := 1 to n do

 begin

   a[i] := -n div 2 + random(n);

   Write(a[i]:4);

   if a[i] = 0 then

     inc(k0);

   if a[i] > 0 then

     s := s + a[i];

   if a[i] < 0 then

   begin

     p := p * a[i];

     inc(k);

   end;

 end;

 WriteLn;

 Writeln('Сумма: ', s);

 Writeln('Количество 0: ', k0);

 if k <> 0 then

   Writeln('Произведение: ', p)

 else

   Writeln('Нет таких чисел. ')

end.

Объяснение:

0,0(0 оценок)
Полный доступ
Позволит учиться лучше и быстрее. Неограниченный доступ к базе и ответам от экспертов и ai-bota Оформи подписку
logo
Начни делиться знаниями
Вход Регистрация
Что ты хочешь узнать?
Спроси ai-бота