CLS
SCREEN 12
REM WINDOW (-10, 10)-(10, -10)
LOCATE 16, 80
PRINT "x"
LOCATE 1, 40
PRINT "y"
LOCATE 16, 40
PRINT "0"
LOCATE 14, 40
PRINT "1"
LOCATE 16, 44
PRINT "1"
LINE (320, 480)-(320, 0), 5
LINE (0, 240)-(640, 240), 5
ymin1 = 10 ^ 10: ymax1 = -10 ^ 10
ymin2 = 10 ^ 10: ymax2 = -10 ^ 10
ymin3 = 10 ^ 10: ymax3 = -10 ^ 10
FOR x = -10 TO 10 STEP .01
y = 500 - 20 * x
IF y > ymax1 THEN ymax1 = y
IF y < ymin1 THEN ymin1 = y
NEXT x
FOR x = 0 TO 10 STEP .03
y = 300 / x ^ 2
IF y > ymax2 THEN ymax2 = y
IF y < ymin2 THEN ymin2 = y
NEXT x
FOR x = -5 TO 10 STEP .1
y = 10 * x ^ 2 - 100
IF y > ymax3 THEN ymax3 = y
IF y < ymin3 THEN ymin3 = y
NEXT x
IF ymax1 > ymax2 AND ymax1 > ymax3 THEN
ymax = ymax1
ELSEIF ymax2 > ymax3 AND ymax2 > ymax1 THEN
ymax = ymax2
ELSE
ymax = ymax3
END IF
IF ymin1 < ymin2 AND ymin1 < ymin3 THEN
ymax = ymax1
ELSEIF ymin2 < ymin3 AND ymin2 < ymin1 THEN
ymin = ymin2
ELSE
ymax = ymax3
END IF
MY = 240 / (ymax - ymin)
MX = 32
n = 480
WHILE n > 0
LINE (305, MY * 100 + n)-(335, MY * 100 + n), 5
n = n - MY * 100
WEND
n = 640
WHILE n <> 0
LINE (n + MX, 250)-(n + MX, 230), 5
n = n - MX
WEND
FOR x = -10 TO 10 STEP .01
PSET (MX * x + 320, -MY * (500 - 20 * x ^ 2)), 10
NEXT x
FOR x = 0 TO 10 STEP .03
PSET (MX * x + 320, MY * (300 / x ^ 2)), 11
NEXT x
FOR x = -5 TO 10 STEP .1
PSET (MX * x + 320, -MY * (10 * x ^ 2 - 400) + 240), 12
NEXT x
LOCATE 6, 50
PRINT "f(x) = EXP(0.5 x)"
LOCATE 10, 55
PRINT "f(x) = 30x+100"
LOCATE 18, 43
PRINT "f(x) = 300 - 20 x"
Тестирование выполнено в программе QB64 ( Скачать )