.

Basic

Язык: русский
Формат: реферат
Тип документа: Word Doc
0 268
Скачать документ

IEIENOA?NOAI IAUAAI E

I?IOANNEIIAEUeIIAI THA?ACIAAIEss ?O

OAIAIANEEE AINOAeA?NOAAIIUE OAOIE*ANEEE

OIEAA?NEOAO

EAOAAe?A AAIN

Eo?niaay ?aaioa

ii eioi?iaoeea

Aa?eaio ?2

Auiieiee: no.a?.I-14 Oiiic A.A.

I?iaa?ee: E?aniyineee I.I.

Oaiaia 1999

Caaeaiea.

?ac?aaioaoue i?ia?aiio aeey iino?iaiey a?aoeea ooieoeee y = a-x.

I?ia?aiia aeieaeia:

iaania/eaaoue iino?iaiea a?aoeea caaeaiiie ooieoeee ia ye?aia IE;

i?iecaiaeeoue ianooaae?iaaiea a?aoiaioa e cia/aiey ooieoeee;

no?ieoue ine eii?aeeiao, iaiineoue ia ieo ?aciaoeo n ii?aaeaeaiiie
aeene?aoiinoueth e iiaeienuaaoue eo.;

iaania/eaaoue aaiae eiyooeoeeaioia caaeaiiie ooieoeee a aeeaeiaiaii
?aaeeia n eeaaeaoo?u, a iaeanoue cia/aiee a?aoiaioa ec oaeea «dan.txt»;

auaiaeeoue cia/aiey ooieoeee a oaee «dat.txt»;

eniieueciaaoue i?ioeaaeo?o – ooieoeeth aeey ii?aaeaeaiey caaeaiiie
ooieoeee;

eniieueciaaoue i?ioeaaeo?o – iiaei?ia?aiio aeey iino?iaiey inae
eii?aeeiao, ianooaaiie naoee, ianooaae?iaaiey.

Iienaiea i?ia?aiiu.

Aeey ei??aeoiie ?aaiou i?ia?aiiu iaiaoiaeeii eiaoue a eaoaeiaa ayeneea
neaaeothuea oaeeu:

KURS_T.BAS

DAN.TXT

Iinea aoiaea a QuickBASIC iaiaoiaeeii ioe?uoue oaee KURS_T.BAS. Aeey
/aai iaiaoiaeeii iaaeaoue eeaaeoo «Alt», iinea /aai a aa?oo aeeaeiaiaiai
ieia auaeaeeony ioieo iaith «Oaee». Aeaeaa iaiaoiaeeii aieoe a iaai
iaaeaoeai eeaaeoe «Enter». Iinea iaaeaoey eeaaeoe «Enter» aunaaoeony
nienie iiaeioieoia ec eioi?uo iaiaoiaeeii aua?aoue iiaeioieo «Ioe?uoue .
. .» n iiiiuueth eeaaeo «(», «(» e iaaeaoue «Enter».

Iinea aoiaea a iiaeioieo iaith «Ioe?uoue . . .» iiyaeony ieii ni nieneii
oaeeia n ?anoe?aieai *.BAS. Aeey ioe?uoey oaeea iaiaoiaeeii iaaeaoue
eeaaeoo «Tab» e aua?aoue eeaaeoaie «(», «(» oaee n iacaaieai KURS_T e
iaaeaoue eeaaeoo «Enter».

Iinea ioe?uoey oaeea KURS_T a aeeaeiaiaii ieia iiyaeony oaeno i?ia?aiiu.
Aeey caionea i?ia?aiiu iaiaoiaeeii iaaeaoue ooieoeeiiaeueioth eeaaeoo
F5, a aeey ia?acaionea i?ia?aiiu iaeiia?aiaiiia iaaeaoea eeaaeo «Shift»
+ F5.

Iinea ieii/aiey ?aaiou i?ia?aiiu iaiaoiaeeii aueoe ec aaeneea, aeey /aai
iaiaoiaeeii aieoe a ioieo iaith «Oaee» e iiaeioieo «Auoiae».

Iniiaiui iiaeoeai i?ia?aiiu yaeyaony oaee KURS_T.BAS ninoiyuee ec
aeaaiie i?ia?aiiu, i?ioeaaeo?u – iiaei?ia?aiiu e i?ioeaaeo?u – ooieoeee.

Aeaaiay i?ia?aiia inouanoaeyao ia?auaiea e oaeeai, oi?aaeaiea
i?ioeaaeo?aie e iino?iaiea a?aoeea caaeaiiie ooieoeee.

I?ioeaaeo?a – iiaei?ia?aiia inouanoaeyao iino?iaiea eii?aeeiaoiie naoee
e aa ?aciaoee.

I?ioeaaeo?a – ooieoeey iicaieyao ?ann/eoaoue cia/aiea caaeaiiie
ooieoeee.

Oaee DAN.TXT iaiaoiaeei aeey aaiaea ec iaai eioa?aaea eciaiaiey o.

Iinea caaa?oaiey i?ia?aiiu iiyaeyaony oaee DAT.TXT a eioi?ii iaoiaeyony
cia/aiey ooieoeee.

Oaeno i?ia?aiiu

DECLARE SUB xoy (d!, t!, a!, b!)

DECLARE FUNCTION y! (b!, a1!)

CLS : SCREEN 9

COLOR 10

PRINT ” – x”

PRINT “Ooieoeey o = a”

INPUT “Aaaaeeoa eiyooeoeeaio a”; a1

n$ = “dan.txt”

OPEN n$ FOR INPUT AS #1

INPUT #1, a: INPUT #1, b: PRINT “x y [“; a; “,”; b; “]”

CLOSE

i1 = 0: d = (300 * a) / b

DIM y1(1400)

FOR i = a TO b

i1 = i1 + 1

y1(i1) = y(i, a1): ‘PRINT y1(i1)

NEXT i

i1 = 0

t = y1(1)

d1 = 160 / y1(1)

CALL xoy(d, t, a, b)

OPEN “dat.txt” FOR OUTPUT AS #2

PRINT #2, ” – x”

PRINT #2, “Ooieoeey y = “; a1

PRINT #2, “x y [“; a; “, “; b; “]”

FOR i = a TO b

i1 = i1 + 1

PRINT #2, “y(“; i; “)= “; y1(i)

NEXT i

CLOSE

PSET (300 + d, 175 – y1(1) * d1)

FOR i = a + 1 TO b

LINE -(300 + i * d, 175 – y1(i) * d1)

NEXT i

END

SUB xoy (d, t, a, b)

LINE (300, 180)-(300, 0), 10

LINE (290, 175)-(650, 175), 10

FOR mx = 300 TO 625 STEP d

LINE (mx, 175)-(mx, 10), 3

NEXT mx

FOR my = 175 TO 10 STEP -16

LINE (300, my)-(625, my), 3

NEXT my

COLOR 13: LOCATE 1, 37: PRINT “y”

COLOR 13: LOCATE 14, 78: PRINT “x”

LOCATE 14, 35: PRINT 0: LOCATE 14, 74: PRINT b

LOCATE 2, 33: PRINT t

END SUB

FUNCTION y (b, a1)

y = a1 ^ (-b)

END FUNCTION

Aa?eaio caaeaiey.

Aa?eaio ? 2, I /aoaa?oue.

– x

Ooieoeey y = 2

x y [ 2 , 20 ]

y( 2 )= .125

y( 3 )= .0625

y( 4 )= .03125

y( 5 )= .015625

y( 6 )= .0078125

y( 7 )= 3.90625E-03

y( 8 )= 1.953125E-03

y( 9 )= 9.765625E-04

y( 10 )= 4.882813E-04

y( 11 )= 2.441406E-04

y( 12 )= 1.220703E-04

y( 13 )= 6.103516E-05

y( 14 )= 3.051758E-05

y( 15 )= 1.525879E-05

y( 16 )= 7.629395E-06

y( 17 )= 3.814697E-06

y( 18 )= 1.907349E-06

y( 19 )= 9.536743E-07

y( 20 )= 1.563283E-08

Nienie eniieuecoaiie eeoa?aoo?u.

O.I. Auey, I.E. Auey «Eco/aai eioi?iaoeeo, i?ia?aiie?oy ia Ayeneea»,
ecaeaiea 2-a, eni?aaeaiiia, «Ae?en ?ieueo», 1997.

Нашли опечатку? Выделите и нажмите CTRL+Enter

Похожие документы
Обсуждение

Оставить комментарий

avatar
  Подписаться  
Уведомление о
Заказать реферат!
UkrReferat.com. Всі права захищені. 2000-2020