Program pr; var mas: array[1..10] of integer; i, ind: integer; begin randomize; for i : = 1 to 10 do begin mas[i] : = random(100); write(mas[i], ' ') end; writeln(); ind : = 1; for i : = 2 to 10 do if (mas[ind] > mas[i]) then ind : = i; write('номер минимального элемента массива: ', ind); end. тестовое решение: 16 79 63 7 7 61 2 92 30 54 номер минимального элемента массива: 7
tanya14757702
02.06.2022
'qbasic const n = 10 dim a(1 to n) as double, b(1 to n) as double, x(1 to n) as double randomize timer cls for i = 1 to n a(i) = 50 * rnd - 25 b(i) = 50 * rnd - 25 if a(i) < > 0 then x(i) = b(i) / a(i) else x(i) = 0 end if print using "###.#####"; a(i); print " * "; print using "###.#####"; x(i); print " = "; print using "###.#####"; b(i) next i тестовое решение: -14.65854 * 0.53867 = -7.89606 -14.19729 * 1.08311 = -15.37722 -17.21156 * -0.07488 = 1.28888 16.17024 * -1.09750 = -17.74690 -13.80126 * -1.06180 = 14.65417 17.78583 * 0.83055 = 14.77207 -10.95534 * -1.58899 = 17.40791 -11.84992 * 1.66222 = -19.69714 -24.91831 * -0.95948 = 23.90864 -12.68757 * 0.84160 = -10.67785