DIM a AS SINGLE, b AS SINGLE, h AS SINGLE DIM x AS SINGLE, y AS SINGLE CLS INPUT "Vvedite a,b,h: ", a, b, h FOR x = a TO b STEP h y = 1 / 2 * LOG(x ^ 2) + 1 / x ^ 2 + 2 - 1 / 2 * LOG(2) / 3 PRINT "x="; x, "y="; y NEXT x END
DIM a AS SINGLE, b AS SINGLE, h AS SINGLE DIM x AS SINGLE, y AS SINGLE CLS INPUT "Vvedite a,b,h: ", a, b, h FOR x = a TO b STEP h y = 1 / 2 * LOG(x ^ 2) + 1 / x ^ 2 + 2 - 1 / 2 * LOG(2) / 3 PRINT "x="; x, "y="; y NEXT x END
DIM x AS SINGLE, y AS SINGLE
CLS
INPUT "Vvedite a,b,h: ", a, b, h
FOR x = a TO b STEP h
y = 1 / 2 * LOG(x ^ 2) + 1 / x ^ 2 + 2 - 1 / 2 * LOG(2) / 3
PRINT "x="; x, "y="; y
NEXT x
END
Тестовое решение:
Vvedite a,b,h: 2.7,8.4,0.5
x= 2.7 y= 3.014901
x= 3.2 y= 3.145283
x= 3.7 y= 3.265854
x= 4.2 y= 3.376249
x= 4.7 y= 3.477307
x= 5.2 y= 3.570116
x= 5.7 y= 3.65572
x= 6.2 y= 3.735039
x= 6.7 y= 3.80886
x= 7.2 y= 3.877846
x= 7.7 y= 3.942562
x= 8.2 y= 4.003482
DIM x AS SINGLE, y AS SINGLE
CLS
INPUT "Vvedite a,b,h: ", a, b, h
FOR x = a TO b STEP h
y = 1 / 2 * LOG(x ^ 2) + 1 / x ^ 2 + 2 - 1 / 2 * LOG(2) / 3
PRINT "x="; x, "y="; y
NEXT x
END
Тестовое решение:
Vvedite a,b,h: 2.7,8.4,0.5
x= 2.7 y= 3.014901
x= 3.2 y= 3.145283
x= 3.7 y= 3.265854
x= 4.2 y= 3.376249
x= 4.7 y= 3.477307
x= 5.2 y= 3.570116
x= 5.7 y= 3.65572
x= 6.2 y= 3.735039
x= 6.7 y= 3.80886
x= 7.2 y= 3.877846
x= 7.7 y= 3.942562
x= 8.2 y= 4.003482