WWW.DISSERS.RU


...
    !

Pages:     | 1 |   ...   | 3 | 4 || 6 | 7 |   ...   | 21 |

p a e c x c o o opae cpyyp aopa coy cooyoc ox coo oo coeex epea ypae. Tao eo aaec eoo o cxe. OCT-19.003-80- opa coo, OCT-19.002-80paa cocae aopo. Heoope co o-cxe pee a. 4.

4 Co o-cxe Haae coo Ooaee ocee o opao poecca (opeee poecc ceoe ece oceoaeoc cex ec) pooee a. Haae coo Ooaee ocee poepa yco Peee paee aope.

Haao a. Byp Moa oa acac apaep a, oopoo yaaec eo aaoe aee.

Bcee o peopeee opopae poecc caapa opopaa.

Bo-o oe Bo-o e.

Haao oe yc ocaoeo aopa.

oeap oeap, oce paoy aopa Ec aop e Coee yeaec a oo ce, o eo oo oe coee.

Pa o o c c p y y p a o p o oeca cpyypa oo aopa oe pecaea oae pex aox cpyyp. o:

ceoae, paeee . Xapaepo ocoeoc x cpyyp ec ae x ooo xoa ooo xoa.

1 aoa cmpymypa ceoau (pc. 6) oaae, o a oepaopa o oe oceoaeo.

Cooyoc aox cpyyp ceoa, ox cee oepa, aam ue ucume aopumo.

2 Cpyypa "ecu; mo; uae" (pc. 7). a cpyypa oeceae acoc o peyao poep yco, op ooo aepax ye pao aopa. a ye ee oey xoy e aco o oo, ao y ye pa.

PC. 6 CTPTPA "CEOBAHE" Pc Cpyypa ec o ae Aop, coca oopoo xo aoa cpyypa paee, aaec paemuc.

3 oopee (u) oeceae oopee ecy paoy oepaopo. Paa e paooc a: c peycoe (pc. 8); c ocycoe (pc. 9).

Oco x pae ec o, o oepaop ea a "oa" oc acoc o yco, a e "o" oepaop ea a oc xo pa e acoc o yco.

Aop, ee coe cocae aoy cpyypy, a aac uuecuu aopumau.

opaa a eoxo ypae oepaop, aae aaoo ae apaepa a, eee apaepa a, poepa yco ooa a.

xo poepa e yco a Teo a xo Pc. 8 c peycoe Pc. 9 c ocycoe "oa" "o" 5 POPAMMPOBAH BCOOO POBH EMEHT OB POPAMMPOBAH C A CA Turbo C++ (C) Turbo Pascal 7.0 (aca) oepa oy p popapoa. popa oo paac a oy, cocoe opopa.

eceau aac ae ecec ae e eca popaa. Bx co xo ae apeeppoae coa, ceae co, eaop, e, ca cpooe oca.

ece paec ey coo o eco paee.

emuuamop - o ea, oope coyc ooae o, oca, epeex, poeyp, y, oye, popa. eaop oe aac c y coa, oycac p co oepa. eaop oy e y y, oao, a oopa aca yy epe 63 coa, oopa C - 31 co. oop a C ee oooc paa poce aae y. ooy oa pocx aax y eaopax o ce popae oa oaoo. B acae coococae eaop yc co, o aa ac c oo y, a C coyec a oepa.

Hanpuep: my_program C MyProgram acae.

Cca a epeey pecae coo eaop epeeo c eco aaopa e x.

auuamop cya ee ae cc a epeey.

Hanpuep: eaop acca e aaopa ec cco a ec acc, Results. eaop acca c yaa eco ooaae ope ee acca, ao cyae epeey: Results[Current + 1].

BCAE, EC OMOHEHTO BETC AC OET, A HECOM MO HO AAT OOHAEHE O; B TOM CAE CCA HA EPEMEHH OHAAET OHPETHOE OE BHTP OHPETHO OMOHEHT MACCBA: RESULTS[CURRENT + 1].DATA.

Ec yaaea epeea acc, o oo oa ec ooae eeo oo acca.

Cmpoo C aca aac oceoaeoc x coo pacpeoo aopa ASCII, aey aocpo acae oe a C.

oemapue caec a oa poox coo aex {} (* *) acae, C /* */ // o oa cpo. oeap, oopo a opaec ypo coo ceye co $, eppepyec a pea aca.

C p y yp a p o p a Bae c o pe ocpoe popa a C acae ec p, coaco oopoy ce eoae oe o oca. Opae oey caoc oo oce oo, oa ao eo oe ocae, ooao aaee cpyypy. popa coepa a paea: epo coepc oee cex oeo, coyex popae, a cee ex, o oca e ee. Bopo pae coep oepaop, oope oca ec a peapeo oe oea, eoxo peaa aopo. B acae o pae oeec o epoo coo begin, aaaec coo end; C eco begin coyec opaac ypa coa {, a eco end apaac }. oce end acae o paee oaeo oa oa. B acae aooo e ec oae apyo popax cpec. Oao, peoeyec yaa popa. eaec o a. Program popa. BC aooo ocycye.

oop C oee o e peye ecoo opaa cpyyp popa. Ocae epeex oe cpeac o epe x ee, oao coe xopoeo c popapoa eaeo pepac "acaeco" cpyyp popa.

aa popaa, acaa a C oea e y main, a a ee paoa aaec eo c ee.

Moy o oa popaa ea oee coco ypo.

P O P AMMA HA C MOE T M E T CE CTP T P :

- ee coyex oex ao;

- ocae oax epeex y;

- ec y;

- ay y c ee void main (void), a e:

- ocae oax epeex;

- oepaop popa.

B caapo acae popa e ec opa:

program popa;

uses aee oy;

label e;

const oee oca;

type opeeee o ax;

var oee epeex;

procedure function;

begin eo popa, poeyp y;

end.

Hae cex oe label, const, type, var, procedure function popae eoaeo. Oao caapoo aca, ec o ec, opo x ceoa cpoo peaepoa, popae o o pcycoa oo o pa. a cee oe, cey poeyp y, oo ae eo popa.

Turbo Pascal 7.0 C++ oecea oee y cpyypy popa. Oao ceye ya, o ce eaop o .

Cmu npopaupoau. Xopo ce popapoa caecc a ca popa, p oopo oa ee ey cpyypy, eay ee ocyo oa. Ceye pepac c peeoo paee help C aca.

p e p o e c c o p, o o p, a p y C oo, o cxoa popaa, acaa a e C a opacpoaa epeeea coe a o a c pacpee *.exe, oa oa po epe p poecca:

pepoeccpoae, o apya.

1 B aay pepoeccopa xo oee p eoxooc ao popae ex ao, yaax p oo pe #include < aa c pacpee h > #include <" aa c pacpee">. pepoeccop ocae a eco x pe ec ao. Ec aa aeo < >, o oc aa pooc ceao paee, e xpac a c pacpee *.h ( peop INCLUDE). Ec aa aeo " ", o oc aa pooc caaa eye paee, a ae paee ocaoo. " aa" o ec popa, oope c eca ex y (o aao c oy aca).

He o o p e c a a p e a e e o e :

#include o-o;

#include paoa c oa;

#include aeaeca oea;

#include-paoa co cpoa;

#include-paoa c pepa;

#include-paoa c eepaopo cyax ce;

#include-paoa c pao;

#include-paoa c aeco a.

C oo pe #define, ce a oopo ec apo aee apo, apep, #define N 3 oo yaa pepoeccopy, o p o oe cxoo ae aoo e apo o ae o a cooecyee aee apo. aco apo coyc oo, o ya eaop eo aee.

Hapep, # define Pi 3.14. BC po ea apo ca c aao y.

2 oop a ecoo ao pacpye o, o paaae pepoeccop oe a c pacpee *.OBJ, coepa opoa a o, p yco, o e cpec cacece ceaece o. Ec cxoo ae C popa oapyac o, o popacy aec x cco.

3 apy cae ey coo oe a, oyae o oopa c popaa peyex oe ooo c py aa. B peyae cop oyaec a c pacpee *.EXE, oop oe cooa epcoa oepo.

T a x o oca, epeee cpyyp, coepae ca (ee eecee), ec (co cpo) apeca (epeex cpyyp).

o a oac opee ae, oope opaaac o pe oe popa.

Bce ax C oo pae a 2 aeop: cape cocae. pee a cpyypo cxee (pc. 10).

epeopeee a C coyec oepaop typedef.

puep:

typedef char str40[41];

typedef unsigned cher byte;.

CAPHE COCTABHE AATE APMET EPECE MACCB CTPT CMEC ECE P UNION H STRUCT & C ABAE EE ATO char float int double short long float long int...

signed unsigned Pc. 10 Cpyypa cxea o ax C B acae acac 4 ocox acca o ax:

1) poce ;

2) cpyyppoae ;

3) ccoe ;

4) poeype .

Cpyypa cxea peea a pc. 11.

Ha py c peopeee a acae oy cooac , aaaee popaco. Bce pye o oca paee oe. poce paec a opoe eecee. opoe paec a ee, oecee, coe, epecee, epae. opooe a ae aoy oopx cac cooecy opo oep. oy ae opooo a oo pe caapy y Ord (x), oopa opaae opo oep oo ae. oy ae opooo a oo pe caapy y Pred (x), oopa opaae aee, peecyee aaoy. oy ae opooo a oo pe caapy y Succ (x), oopa opaae aee, ceyee a aa.

T ax acae Integer, long (shot) int, ee oece True, false opoe Coe Char poce epece.

< a>=(cco) )000e) T aao < a>= min.. max Beecee <> = array[1..n,1..n,...] of...

Macc Cpyyppoac <> = record ae Moeca <> = set of a Var <>: <> <> = file of <> aae < yaae>=^ Cpo var < >:string < >:=procedure(function) (ea ):

poeype Oe Pc. 11 Cpyypa cxea o ax acae O E C T B A C A E ae oecoo a oy pa a ae: true and false. ae opeeec coooee:

false

Ord (false) = 0; {Opeeee ae opooo ea} Ord (true) = 1;

Succ (false) = true;

Succ (true) = false. {ocee aee opooo a} E P E C E M E T B A C A E epece opeeec oe aopo ae, oope yaac pyx coax.

T oec cey opao:

Type [Name] = (name1, name2, , namen), e [Name]- a, a namei ea epecex epeex.

Hanpuep:

Type Color = (Blue, Red, Green).

H T E P B A H E T B A C A E Bea epaoo a oe pa aee aaoa ae oo opooo a.

p oe oo a aac e oca, yaae epx pa aaoa oycx ae. Oe oca o paea ooy opooy y. o oec cey opao:

Type [Name] = [const1]..[const2].

Hanpuep:

Type Diapazon = 1... 10;

o po cooa p oex acco.

C T P T P P O B A H H E T A H H X o acc, ac, oeca, a. oo oo, ec ae ax a yaae, cpo, poeype ax oe.

Opeec a cox ooeo cocoa x cpyypa.

Ma c c B acae peypoy y ooc ooepy ooepy cooyoc cpoaoo ca oox eeo. p oe peypoo a aaec eo eeo, a ae eca o aoy eo epe. oyc a eca c ce opoe a cee LongInt.

oo cooa e epaoo a. O acc 100 eeo.

Type Data = array[1..100] of real;

Pages:     | 1 |   ...   | 3 | 4 || 6 | 7 |   ...   | 21 |



2011 www.dissers.ru -

, .
, , , , 1-2 .