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

Найти сумму и произведение элементов одномерного числового массива M = (5; 45; 6; 87; 41; 36; 74; 12; 3; 10).

В отчет включить блок-схему, текст программы на Паскале, реакцию ЭВМ.

ПОМОГИТЕ ДАМ 100 БАЛОВ!!!!!!

Ответы

Автор ответа: kukolev
7

Ответ:

program Project1;

const

 maxelem = 10;

var

 a: array [1..maxelem] of integer; { Переменная для  хранения массива.}

 n: integer; {  Переменная для хранения значения количества элементов в массиве.}

 i: integer; { Вспомогательные переменные для организации циклов.}

 sum: integer; { Переменная для хранения значения суммы }

 mult: double;  { Переменная для хранения значения произведения }

begin

 n:= 10;

 a[1]:=5; a[2]:=45; a[3]:=6; a[4]:=87; a[5]:=41;

 a[6]:=36; a[7]:=74; a[8]:=12; a[9]:=3; a[10]:=10;

 sum:= 0;

 mult:= 1;

 writeln('Исходный массив: ');

 for i:= 1 to n do

   begin

     sum:= sum + a[i];

     mult:= mult*a[i];

     write(a[i]:5);

     if i mod 10 = 0 then

       writeln;

   end;

 writeln;

 writeln('Сумма элементов массива: ',sum); {319}

 writeln('Произведение элементов массива: ', mult:0:0);{4618209168000}

 Readln;

end.

Объяснение:

В принципе я указал комментарии к некоторым моментам, так что должно быть понятно(комментарии потом можешь стереть). Также приложил два скриншота с блок-схемой и результатом программы, приложишь их в отчет.

Приложения:

tsvetkovae: спасибо большое
tsvetkovae: очень помогли
tsvetkovae: а вы с интернетурока????????
Похожие вопросы
Предмет: Українська мова, автор: Танічька
Предмет: Английский язык, автор: Bluetooth

 Проверьте сочинение и исправьте ошибки

In modern global world more and more people are studying foreign languages. The question about the best way to do it provokes a lot of debate. Some people believe that it is impossible to become fluent in language without visiting it is native country. Others find it not obligatory.
I personally think that it is not a problem to learn a foreign language in their home country. There are a great number of possibilities for it. To begin with, every school and university today gives for students an opportunity to study a foreign language. Teachers and tutors in educational institutions do their best to help students to get knowledge. Besides, there is a number of language courses. They give a large choice of different programs. So you can choose the most suitable one according to your level and purposes. Furthermore, nowadays there is a wonderful opportunity to study using a computer. There is a large variety of educational programs and electronic dictionaries. Moreover, you can watch foreign films in the original.
But many people believe that the only way to have a good result at language studying is to communicate with native speakers. So they find it obligatory to study abroad. To my mind it is not necessarily thing. It is not difficult today to communicate with foreigners. Using the Internet you can chat with people from all over the world.
To sum it up, it seems to me that communication with native speakers is very important for those who want to master the language. But I see some ways to connect with them beside studying abroad.