10 SCREEN 1: CLS : KEY OFF
20 LOCATE 4, 3: PRINT "Определить напряженность и потенциал"
30 LOCATE 7, 1: PRINT "   электрического поля равномерно "
31 LOCATE 10, 1: PRINT "   заряженной сферы зарядом q и"
40 LOCATE 13, 1: PRINT "    радисом R на расстоянии r"
50 LOCATE 16, 5: PRINT "       от ее центра "
60 LINE (0, 0)-(311, 199), 2, B
70 IF INKEY$ = "" THEN 70
80 CLS : SCREEN 1
90 LOCATE 3, 4: PRINT "          "
100 LOCATE 1, 2: PRINT "Введите заряд сферы q,нКл": Q$ = "": LOCATE 3, 2: INPUT "q=", Q$: IF Q$ = "" THEN BEEP: GOTO 90:  ELSE Q = VAL(Q$)
110 LOCATE 5, 4: PRINT "          "
120 LOCATE 1, 2: PRINT "Введите радиус сферы R,м  ": R$ = "": LOCATE 5, 2: INPUT "R=", R$: IF R$ = "" THEN BEEP: GOTO 110:  ELSE R = VAL(R$)
125 IF R <= 0 THEN BEEP: GOTO 110
130 LOCATE 7, 4: PRINT "          "
140 LOCATE 1, 2: PRINT "Введите расстояние до центра сферы r,м": A$ = "": LOCATE 7, 2: INPUT "r=", A$: IF A$ = "" THEN BEEP: GOTO 130:  ELSE A = VAL(A$)
145 IF A <= 0 THEN BEEP: GOTO 130
150 K = 9
160 IF A < R THEN E = 0: F = K * Q / R ELSE E = K * Q / A ^ 2: F = K * Q / A
170 LOCATE 1, 2: PRINT "                                       "
180 LOCATE 1, 1: PRINT "Дано:": LOCATE 1, 15: PRINT "Решение:"
190 LOCATE 5, 5: PRINT "    ": LOCATE 3, 5: PRINT "    "
200 LOCATE 3, 1: PRINT "q="; Q; "нКл": LOCATE 5, 1: PRINT "R="; R; "м": LOCATE 7, 1: PRINT "r="; A; "m"
210 LOCATE 11, 1: PRINT "E - ?": LOCATE 9, 1: PRINT "ф - ?"
220 LOCATE 3, 15: PRINT ""
230 LOCATE 3, 15: PRINT "Если r<R, E = 0"
240 LOCATE 5, 15: PRINT "                q"
250 LOCATE 6, 15: PRINT "          ф = k───"
260 LOCATE 7, 15: PRINT "                R"
270 LOCATE 9, 15: PRINT "                  q"
280 LOCATE 10, 15: PRINT "Если r>=R, E = k────"
290 LOCATE 11, 15: PRINT "                 r¤"
300 LOCATE 13, 15: PRINT "                 q"
310 LOCATE 14, 15: PRINT "           ф = k───"
320 LOCATE 15, 15: PRINT "                 r"
330 LINE (80, 0)-(80, 100): LINE (80, 60)-(0, 60)
340 LOCATE 19, 2: PRINT "ОТВЕТ:"
345 E = INT(E * 100) / 100: F = INT(F * 100) / 100
350 LOCATE 19, 10: PRINT "E ="; E; "B/m": LOCATE 21, 10: PRINT "ф ="; F; "B"
360 LOCATE 23, 30: PRINT "ESC - Выход"
370 W$ = INKEY$: IF W$ = "" THEN 370
380 IF W$ = CHR$(27) THEN RUN "22222"
390 GOTO 80

