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

Задание 1. Дан массив А, содержащий последовательность чисел:
0,5; 12; -18; 16; 13; 5; 8; 0. Найти сумму элементов массива.
Задание 2. Дана температура воздуха за неделю января. Составьте
программу нахождения средней температуры воздуха за эту неделю.
Помогите пожалуйста,желательно с объяснением.


Вованичикчка: Какой язык программирования?
Alitatonoyan15: Паскаль
Вованичикчка: PascalABC.Net, Turbo Pascal или Free Pascal?
Alitatonoyan15: Pascal ABC.Net

Ответы

Автор ответа: Вованичикчка
3

Задание 1.

begin

   var A:= new real[](0.5, 12, -18, 16, 13, 5, 8, 0);  // инициализация массива

   A.Sum().Println();  // Нахождение суммы элементов и вывод ее в консоль

end.

Задание 2.

begin

   var weather:= new real[7](-20, -22, -20, -18, -18, -19, -18);  // инициализация массива с температурой воздуха на неделю

   weather.Average().Println();  // нахождение среднего арифметического элементов массива и вывод его в консоль

end.


Аноним: Здравствуйте извините что отвлекаю вас вы не поможите мне с информатикой на Python задание в моём аккаунте заранее благодарю вас
Похожие вопросы
Предмет: Математика, автор: AmUp
Предмет: Английский язык, автор: Nafika

Прочитайте и переведите текст. Подчеркните в тексте глаголы в Passive Voice и определите их время.

Crime and Punishment About 90 per cent of all crimes in Great Britain are dealt with by Magistrates’ courts which can impose fines or prison sentences of up to six months. More serious cases go to a Crown Court. The most severe punishment is life imprisonment. Capital punishment was abolished in England in November 1965. Today public opinion in Britain has changed. Some people think that death penalty may not be the ideal answer, but it is better than nothing. In England there are no minimum sentences, except for murder, which carries a penalty of life imprisonment, but life sentences are rarely more than 14 years, because they can be reduced for good behavior, often by one third or more. But the problem of how to prevent murders remains. Some murders are committed by criminals evading arrest, by insane or mentally disturbed people, by cold-blooded sadists completely devoid of all human feelings. The important thing in the prevention of murder is to eliminate the weapons and instruments with which these crimes are committed, and to stop the dangerous influence of violence in books, films, and other mass media, from which some criminals derive their “inspiration”. What is the purpose of punishment? One purpose is to correct the offender’s moral attitudes and anti-social behavior and to assist the offender to return to normal life. Punishment can also be seen as a reform because it warns other people of what will happen if they tempt to break the law. The third purpose lies in society’s desire for retribution. In any case, we should try to understand why a person commits a crime and how society failed to enable him to live a respectable life.

 

 Ответьте на вопросы к тексту. 1. Do the English support the abolition of capital punishment? Why? 2. Who commits crimes? 3. What influences on the wrongdoers? 4. What purpose of punishment, in your opinion, is the most important? Why?