7909nastya
25.06.2022 06:46

Информатика нарисовать блок схему

Нажмите на рекламу ниже и сразу увидите ответ
Популярные вопросы:
Ответ:
22391
01.06.2023 02:28

Название файла myhtml.html

<html>

<head>

 <title>Вариант 1</title>

</head>

<body>

 <h2 style="text-align: center">"Тестовое задание"</h2>

 <hr>

 <hr>

 <hr>

 <ul>

  <li>A</li>

  <li>B</li>

  <li>C</li>

  <li>D</li>

  <li>E</li>

 </ul>

 <table border="1">

    <caption>Таблица</caption>

    <tr><td></td><td></td><td></td></tr>

    <tr><td></td><td></td><td></td></tr>

    <tr><td></td><td></td><td></td></tr>

    <tr><td></td><td></td><td></td></tr>

    <tr><td></td><td></td><td></td></tr>

 </table>

 <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>

 <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>

 <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>

<a href="Тут полное путь к этому файлу + /myhtml.html">Скачать</a>

<a href="ссылка на страницу" target="_blank"><img src="https:// vuzopedia.ru/storage/app/uploads/public/602/667/061/602667061f1a3416415373.jpg" style="width:100%"></a>

</body>

</html>

0,0(0 оценок)
Ответ:
pbavaМАНЯ
17.04.2021 14:43
1. Путь решения

Поскольку среднее всех введенных чисел нельзя найти, пока не будет закончен ввод этих чисел, а затем каждое число нужно будет сравнивать с этим средним, введенные числа придется где-то хранить. Например, в массиве длиной 100 (в условии сказано, что количество чисел "до 100").
Считаем, что описан массив a[1..100] и в нем находятся n≤100 целых чисел (можно и нецелых, но раз ничего не сказано в условии, мы вправе решить это сами).
Тогда среднее определится по формуле:
\displaystyle m= \frac{1}{n} \sum_{i=1}^na_i
а сумму мы умеем считать, накапливая значение в цикле со счетчиком, дающем проход по всем элементам массива.
Искомое количество чисел, меньших среднего - это тоже сумма, найти которую позволит еще один цикл, но в нем уже будет анализ условия.
\displaystyle k=\sum_{i=1}^na_i, \ a_i\ \textless \ m

2. Программа на языке Pascal

const
  nn=100;
var
  i,n,k,s:integer;
  m:real;
  a:array[1..nn] of integer;
begin
  Write('Количество чисел равно '); Read(n);
  Writeln('Введите числа:');
  s:=0;
  for i:=1 to n do begin Read(a[i]); s:=s+a[i] end;
  m:=s/n;
  k:=0;
  for i:=1 to n do
    if a[i]<m then Inc(k);
  Writeln('Количество чисел, превышающих среднее значение, равно ',k)
end.

3. Пример работы программы

Количество чисел равно 10
Введите числа:
6 -4 11 -7 5 7 0 3 5 -2
Количество чисел, превышающих среднее значение, равно 4
0,0(0 оценок)
Полный доступ
Позволит учиться лучше и быстрее. Неограниченный доступ к базе и ответам от экспертов и ai-bota Оформи подписку
logo
Начни делиться знаниями
Вход Регистрация
Что ты хочешь узнать?
Спроси ai-бота