1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | DIM Summa AS DOUBLE , A AS DOUBLE , B AS DOUBLE , minC AS DOUBLE DIM n AS INTEGER , L AS INTEGER CLS INPUT "число элементов массива"; n DIM C( 1 TO n) AS DOUBLE Summa= 0 L= 0 FOR i= 1 TO n INPUT "Значение элемента"; C(i) IF c(i)> 0 AND c(i)\ 4 = 0 THEN Summa=Summa+c(i) L=L+ 1 END IF NEXT i IF L= 0 THEN PRINT "На ноль делить нельзя" EXIT ELSE Summa=Summa/L END IF FOR i= 1 TO n IF i\ 3 = 0 THEN c(i)=c(i)*Summa END IF NEXT i minC = c( 2 ) L= 2 FOR i= 3 TO n IF i\ 2 = 0 AND minC>c(i) THEN minC=c(i) L=i END IF NEXT i INPUT "граница А"; A INPUT "граница B"; B IF (a-minC)*(minC-b) > 0 THEN c(L)= 1 PRINT minC; L ELSE c(L)= 0 PRINT "HE преднадлежит интервалу" END IF END |