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

В массиве хранится информация о среднедневной температуре за неделю в декабре. Составьте программу, которая подсчитает, сколько дней за неделю было с положительной температурой, сколько дней было с отрицательной и нулевой температурой. Найдите максимальную температуру за неделю. Массив вводится с клавиатуры.

Ответы

Автор ответа: Aillianna
0
//PascalABC.NET версия 3.3.1590 от 03.12.17
//Если программа не запускается, то обновите версию
begin
    var a := ReadArrReal('Введите температуры за неделю', 7);
    Writeln('Дней за неделю было с положительной температурой = ', a.Count(x -> x > 0));
    Writeln('Дней за неделю было с отрицательной температурой = ', a.Count(x -> x < 0));
    Writeln('Дней за неделю было с нулевой температурой = ', a.Count(x -> x = 0));
end.
Автор ответа: gginfo
0
Нестандартное решение, мы такие команды ещё не проходили, но всё равно спасибо)
Автор ответа: Aillianna
0
вполне стандартное для PascalABC.net
Автор ответа: Aillianna
0
стандартные linq запросы
Похожие вопросы
Предмет: Математика, автор: Ramzinn
Предмет: Биология, автор: puqeyvidfj
Предмет: Английский язык, автор: danilexsize
RELATIVE CLAUSES
Choose the best answer:
James will only go to places…………..are recommended by his friends.
a. what b. where c. which d. how.
Miss Kelly took part in the singing contest………….she was on holiday in Japan.
a. what b. where c. when d. how.
Tom,……….is a monitor of the class, is also the captain of the football.
a. who b. which c. whom d. whose.
I saw the man……….owns that car walking towards the shop.
a. which b. whom c. who d. whose
The street…………leads to my school is very narrow.
a. who b. which c. whom d. whose.
Bring me the clock………………..is over there.
a. whom b. which c. whose d. who
My friend, …………aunt is nurse, would like to be a doctor someday.
a. who b. whom c. which d. whose
The dog, ………..tail I stepped on, bit me.
a. who b. whose c. which d. whom
Please give this to the beggar…………….is at the door.
a. who b. which c. whom d. whose
My father gave me the doll…………..I had been hoping for.
a. who b. which c. whom d. which
Yesterday I met my friend…………….gave me a dog on my birthday.
a. who b. whose c. whom d. which.
Any one………….disobeys the rules will be punished.
a. that b. which c. whom d. who.
Budapest,……….is on the Danube, is a beautiful city.
a. where b whose c. when d. which
The river from………….we get our water supply is nearly empty.
a. that b. which c. whom d. where.
The boy…………father is in prison is my friend.
a. whom b. who c. whose d. which