Использование ЭВМ при обучении математики
Рефераты >> Математика >> Использование ЭВМ при обучении математики

NEXT j

NEXT i

ERASE zap

RETURN

preobr:

x = curx * 16 + 203

y = 160 - cury * 14

RETURN

final:

kx = x: ky = y: GOSUB oldstrelka

IF fl = 1 THEN x2 = x: y2 = y: GOSUB strvect: IF ccc = 10 THEN p = 2: GOSUB slov ELSE p = 5: GOSUB slov

IF fl = 0 THEN curoldx = curx: curoldy = cury: x1 = x: y1 = y: CIRCLE (x, y), radius, ccc: IF zakr = 1 THEN PAINT (x, y), ccc

IF ccc = 10 AND fl = 0 THEN p = 3: GOSUB slov

IF ccc = 13 AND fl = 0 THEN p = 4: GOSUB slov

IF ccc = 14 AND fl = 0 THEN p = 6: GOSUB slov

fl = fl + 1

GOSUB zapomin: GOSUB strelka: RETURN

coord:

COLOR 15: CLS

'LINE (0, 0)-(639, 349), 15, B

LINE (10, 10)-(395, 311), 15, B

LINE (10, 10)-(394, 310), 7, B

LINE (400, 10)-(629, 311), 15, B

LINE (400, 10)-(628, 310), 7, B

FOR g = 27 TO 380 STEP 16

LINE (g, 15)-(g, 305), 8, B

NEXT g

FOR g = 20 TO 300 STEP 14

LINE (19, g)-(387, g), 8, B

NEXT g

FOR g = -10 TO 10 STEP 2

LOCATE 13, g * 2 + 25

IF g <> 0 THEN PRINT g

NEXT g

FOR g = -10 TO 10 STEP 2

LOCATE 12 - g, 24

PRINT g

NEXT g

LINE (19, 160)-(387, 160), 7, B

LINE (384, 158)-(387, 160), 7

LINE (384, 162)-(387, 160), 7

LINE (203, 15)-(203, 305), 7, B

LINE (200, 18)-(203, 15), 7

LINE (206, 18)-(203, 15), 7

LOCATE 2, 28

PRINT "y"

LOCATE 11, 49

PRINT "x"

shar:

FOR c = 1 TO 10

CIRCLE (405 + c * 20, 41), 7, 15

LINE (405 + c * 20, 38)-(410 + c * 20, 31), 15

PAINT (405 + c * 20, 39), colora(c), 15

NEXT c

RETURN

strvect:

dx = SQR((x2 - x1) ^ 2)

dy = SQR((y2 - y1) ^ 2)

df = SQR((dx * dx) + (dy * dy))

IF df = 0 THEN df = 1

dsx = k * dx / df

dsy = k * dy / df

dxx = k1 * dy / df

dyy = k1 * dx / df

IF x1 < x2 THEN x3 = x2 - dsx: x4 = x2 - dsx / 2 ELSE x3 = x2 + dsx: x4 = x2 + dsx / 2

IF y1 < y2 THEN y3 = y2 - dsy: y4 = y2 - dsy / 2 ELSE y3 = y2 + dsy: y4 = y2 + dsy / 2

IF SGN(x1 - x2) = SGN(y1 - y2) THEN x31 = x3 - dxx: y31 = y3 + dyy: x32 = x3 + dxx: y32 = y3 - dyy

IF SGN(x1 - x2) * (-1) = SGN(y1 - y2) THEN x31 = x3 + dxx: y31 = y3 + dyy: x32 = x3 - dxx: y32 = y3 - dyy

IF SGN(x1 - x2) = 0 OR SGN(y1 - y2) = 0 THEN x31 = x3 - dxx: y31 = y3 - dyy: x32 = x3 + dxx: y32 = y3 + dyy

LINE (x31, y31)-(x2, y2), ccc

LINE (x32, y32)-(x2, y2), ccc

IF zakrstr = 1 THEN LINE (x32, y32)-(x31, y31), ccc: PAINT (x4, y4), ccc

LINE (x1, y1)-(x2, y2), ccc

RETURN

reklama:

SCREEN 9, , 1, 1

COLOR 7, 0

OPEN FILEHLP$ FOR INPUT AS #1

S = 0

DO

ON ERROR GOTO 0

LINE INPUT #1, stran$

S = S + 1

LOOP UNTIL EOF(1)

CLOSE #1

IF FIX(S / 18) >= (S / 18) THEN KS = FIX(S / 18) ELSE KS = FIX(S / 18) + 1

DIM stran$(S)

OPEN FILEHLP$ FOR INPUT AS #1

FOR i = 1 TO S

ON ERROR GOTO 0

LINE INPUT #1, stran$(i)

NEXT i

CLOSE #1

NS = 1

GOSUB stran

obrabotka:

a$ = INKEY$

IF a$ = CHR$(0) + CHR$(73) THEN NS = NS - 1: GOSUB stran

IF a$ = CHR$(0) + CHR$(81) THEN NS = NS + 1: GOSUB stran

IF a$ = CHR$(27) THEN ERASE stran$: SCREEN 9, , 0, 0: RETURN

GOTO obrabotka

stran:

IF NS < 1 THEN NS = 1: RETURN

IF NS > KS THEN NS = KS: RETURN

n = 18 * NS

LOCATE 1, 1

PRINT "г"; STRING$(64, "="); "T=============¬"

PRINT "¦"; STRING$(15, " "); : COLOR 15, 0: PRINT "ИНФОРМАЦИОННО - СПРАВОЧНАЯ СИСТЕМА"; : COLOR 7, 0: PRINT STRING$(15, " ");

IF NS < 10 THEN PRINT "¦ Страница "; NS; "¦" ELSE PRINT "¦ Страница"; NS; "¦"

PRINT "¦"; STRING$(64, " "); "L=============¦"

FOR i = n - 17 TO n

IF i > S THEN PRINT "¦"; STRING$(78, " "); "¦" ELSE PRINT "¦ "; stran$(i); STRING$((76 - LEN(stran$(i))), " "); "¦"

NEXT i

PRINT "L"; STRING$(78, "="); "-"

'COLOR 1, 7:

PRINT " Выход - Esc ";

'IF NS = 1 THEN COLOR 8, 7 ELSE COLOR 1, 7

PRINT " Предыдущая страница - PageUp ";

'IF NS = KS THEN COLOR 8, 7 ELSE COLOR 1, 7

PRINT " Следующая страница - PageDown "

COLOR 7, 0

RETURN

analis:

PRINT #3,

PRINT #3, "Варианты ответов ученика:";

ccc = 10

COLOR ccc

LOCATE 9, 58: PRINT " "

LOCATE 10, 58: PRINT "AB ( ; )"

PRINT #3,

PRINT #3, "координата x вектора AB ";

vectx1:

p = 11: GOSUB slov

mm = 3: nx = 10: ny = 63

l$ = "+-1234567890"

m$ = "": m = 0

GOSUB napis

PRINT #3, VAL(m$);

IF abx <> VAL(m$) THEN GOSUB glupo: GOTO vectx1

PRINT #3,

PRINT #3, "координата y вектора AB ";

vecty1:

p = 12: GOSUB slov

mm = 3: nx = 10: ny = 69

l$ = "+-1234567890"

m$ = "": m = 0

GOSUB napis

PRINT #3, VAL(m$);

IF aby <> VAL(m$) THEN GOSUB glupo: GOTO vecty1

ccc = 13

COLOR ccc

LOCATE 11, 58: PRINT " "

LOCATE 12, 58: PRINT "CD ( ; )"

PRINT #3,

PRINT #3, "координата x вектора CD ";

vectx2:

p = 13: GOSUB slov

mm = 3: nx = 12: ny = 63

l$ = "+-1234567890"

m$ = "": m = 0

GOSUB napis

PRINT #3, VAL(m$);

IF cdx <> VAL(m$) THEN GOSUB glupo: GOTO vectx2

PRINT #3,

PRINT #3, "координата y вектора CD ";

vecty2:

p = 14: GOSUB slov

mm = 3: nx = 12: ny = 69

l$ = "+-1234567890"

m$ = "": m = 0

GOSUB napis

PRINT #3, VAL(m$);

IF cdy <> VAL(m$) THEN GOSUB glupo: GOTO vecty2


Страница: