WWW.DISSERS.RU


...
    !

Pages:     | 1 |   ...   | 4 | 5 || 7 | 8 |   ...   | 21 |

Ec ee acca ae c acca, o peypyy cpyypy oo paccapa a acc, yee a ey paepoc. ac oe paa:

Array[Boolean] of Array [1..10] of Array[Size] of real Array[Boolean,1..10,Size] of Real;

e ac ae.

const N = 3;

type m = Array[1..N] of Real; {m o opeeee a ooep acc} var b : array[1..N] of m {b- o yep acc acc acca} i, j : iteger;

BC oe acca apax coax yaa acaoe oeco eeo acca.

Heoxoo o, o ee C yepyc c y.

puep:

# define N int mas [N], mass [N][N];

int i, j;

ec mas ooep acc, a mass yep acc.

C T P O O B C M B O H T ae cpoox o peca coo oceoaeoc coo epeeo . p oe cpoo e apax coax yaaec acaoe co aex e coo aaoe o 1 o 255.

Const ErrorMes: String[25] = Error;

var MyString: String [25];

A CMBO B STRING POHMEPOBAH, EPB MEET HOMEP 1. OM CMBO MO HO OPAATC, ABA EO OPOBHOMEP.

B acae 7.0 oc o ax cpo, aaae ye coo #0. B ax ax oo paec 65 535 coo. cpo xpac accax oc cey opao:

eaop cpoa:

Array[ aao,] of Char;

Hanpuep:

Var Zstr : Array[0..N] of Char;

pao c a cpoa eoxoo apoa pey oopa {$X+} {oepa pacpeoo cacca}.

BC cpo, o acc coo a char, anpuep:

char stroka [25].

M H O E C T B A B A C A E Moecma o aop oox oec cax py c pyo oeo. Xapaep ce ey oea opayeaec popaco a e opopyec acae.

Type [Name] = set of [base Type] ao e oe a word, integer, longint. ao e oe a oee 256 oox ae. aa oeca coyec ocpyop oeca cco cea eeo oeca.

Ha oeca opeee ceye oepa:

* epeceee oec; peya coep ee oe oox oec;

+ oeee oec; peya coep ee epoo oeca, ooe eoca eea opoo oeca;

paoc oec; peya coep ee 1-o oeca, oope e paea opoy;

= poepa aeoc opaae "cy", ec oeca ae;

<> poepa eaeoc opaae "cy" ec oeca eae;

<= poepa xoe epoo o opoe;

>= poepa xoe opoo oeca epoe;

in poepa paeoc eea I oecy S I in S.

poeyp Include (S,I) and Exclude (S,I) cooeceo a ca ee oeca (S oeco; I ee).

puep: Type DigitChar = Set of 0..9;

Var S1, S2, S3 : DigitChar;

Begin S1:= [1,2,3];

S2:= [3,1,4]; {ocpyop oeca} S3:= [2,5];

if '1' in S2 then Writeln ('ee 1 pae oecy S2');

end;

Cco cea eeo oeca, oeex py o pya a, opae apae co, aa ocpyopo oeca.

A O B E T A C A ao pecae coo ey oceoaeoc ooeo ace, oope oy paea oy y, a cee aooo oo pyoo, coepaeo ao.

Type [Name] = file of [Type].

ao epeey aooo a oo aa o pex cocoo:

[Name] = File of[Type]; poa a;

[Name] = Text; eco a;

[Name] = File; epoa a, ec [Name] aooo a (eaop); File of apeeppoae coa (a ); Text caapoo a ecox ao; [Type] o , poe aooo. oee opoo o aax paee ao o-o.

C T P T P B OTE OT MACCBOB, BCE EMEHT OTOPX OH T OHOO TA, CTPTP OEHT B OHO EPEMEHHO EMEHT PAHX TOB.

Cpyyp ocpypyc cey opao:

Struct _cpyyp {_1 oe_1;

_2 oe_2;

_n oe_n;

};

Ocae epeeo cpyypoo a cey opao:

Struct struct_name x,y,z.

Cpyyp epee oo pcaa aee apeao (cpay ce cpyype), o x e cpaa a paeco epaeco. cpae cpyyp ceye ca ceapoae y, ace o poe. cpyype oo pe oepa & (oyee apeca) ce ee apeca.

&struct_name.

o cpyyp oo opaac, yaa epeeo, o pae ea oo.

Hapep:

Type_1 value1 = x.field_1;

Type_3 value3 = z.field_3;

Ec epeea ptr opeeea a yaae a cpyypy, o ocya o cpyyp oo cooa oepa "" eco " *ptr ".

Hanpuep:

Struct struct_name *ptr;

Type_1 value1 = ptrfield_1;

Type_2 value2 = ptrfield_2;

Oepaop ptrfield_1aee pae (*ptr).field_1.

Bex cyax, oa oycaec cooa yapy oepa & oye apeca cpyyp eo, oo y e oepa cooa oye apeca ooea cpyyp.

Ha ce cocex oe cpyyp -a eoxooc paa pa a o ae ee oy oa p, yco. Booee yco oe pec apye ooc popa, caaey p epexoe o oo peaa C pyo.

p oe cce Turbo-C eoxoo yaa a, oa oop oe paa cpyyp ( oee) o pae coa, oa cpyype ooee a.

aae a a apapye ceyee:

1 Cpyypa ye aac c pa coa (e apec).

2 aoe e cooe oe ye aac co co a eoe co ao o aaa cpyyp.

3 B oe cpyyp ye (o eoxooc) oae o a, c e o c cpyypa coepaa eoe co ao.

-a-cpyyp o eaop, oop eye cpyyp, opeee cco oe eeo.

Ocae eye epeey cpyypoo a. B aece ocae oe epeeo, opoao yaae, acc y.

aae paccapaec a yaae a cpyypy, acc a acc cpyyp, a y a y, opaaa cpyypy.

Cco-oe-eeo coep oo ecoo oe epeex oe o.

aa epeea, oea o cce, aaec eeo cpyypoo a. O oy oo ocooo a, acco, yaaee, cec cpyypo.

puep:

Struct teacher { Char name[40];

Int number;

Float salary;} list [20], *ptr;

Struct teacher_ school ();

Bo pepe oec acc cpyypoo a teacher 20 eeo, yaae a cpyypy a teacher y, opaaa cpyypy a teacher.

Cpyypa e oe coepa aece eea cpyypy aoo e a, o oe a yaae a cpyypy oo a p yco, o oe cpyyp yaao a. o ooe coaa ce cc cpyyp.

Hanpuep:

Struct tree {int number;

struct tree* left;

struct tree* right;

};

B acae ae oo a po aa ac.

A C ac o cpyypa ax, cocoa cpoaoo ca ooeo, aaex o ac. B oe o acca, ooe (o) ac oy paoo a. o oo o ccac a o o ooe ac, o ac eyc.

Cpyypa oe a ac ee :

[ a] = record [cco oe] end, e [ a] eaop, record, end apeeppoae coa (ac, oe), [cco oe]- cco oe, pecae coo oceoaeoc paeo ac, ey oop cac oa c ao.

a pae coco ooo ecox eaopo oe, oeex py o pya a. a eaopa cac oeoe ec o, apep:

Type BirthDay = record Day, Month, Year:Word end;

var a,b : BirthDay;

Bo pepe BirthDay (e poe) ec ac c o Day, Month, Year (e, ec o); epeee a,b coepa ac a BirthDay.

ae epeex a ac oo pcaa py epee oo e a, apep:

a:= b;.

aoy ooeo ac oo oy ocy, ec cooa cocaoe , yaa epeeo epe oy o:

a.day:= 12;

b.year:= 1965;.

oex oe eoxoo pooa yoe:

Type BirthDay = record Day, Month, Year:Word end;

var p: record Name:String;

Bd : BirthDay end;

begin if p.Bd.Year = 1965 then end;

ea oe ac o ya, peeax o ac, e o oe, oao, ec ac coepa o-ac, o ea oy oopc a pax ypox (a. 5).

5 C a p e a x Ooaee a ax a aao ae C aca aax int Integer 2 -32768... +long LongInt 4 -2147483648...+4 3,4E-38... 3,4Efloat Real 6 2,9E-39..1,7E8 1,7E-308... 1,7Edouble Double 8 5E-324... 1,7Elong double Extended 10 3,4E-493 1,1Echar ShortInt 1 -128... +unsigned char Byte 1 0... unsigned Word 2 0... short 2 -32768... +Single 4 1,5E-45 3,4Ecomp 8 -263+1... 263-epeee, oee e poeyp y, aac oa epee pacoaac ceee ax. epeee, oee cao poeype y, aac oa epee pacoaac ceee cea (opoee paeax: aae acc a).

O H C T A H T ocaa aa eee e popae. B C paa epe a oca: ee, c aae oo coe copooe. B acae paa eoae oca oca e e, opaee oop ocyecec y pa cocoa.

oca e e coyc eocpeceo e ee ae, a oepa pae, eoaa ocaa ooa epeeo.

eoae oca opaec a oe poae. epe e eo aaee , oope oop pacoae aoaec, opx ycaaae popac (a. 6).

6 T oca Oe oca Tpoae oca Const Const Min = 0; Max: Integer = 9999;

Max = 100; Delta: Integer = 1000;

Ctnter = (Max Min) div 2; Min: Integer = Max-Delta;

oca oox o oy e e poe aooo. Oee oca oy pacoaac paee oe pooo ope oece.

ae pae cc a ae o o y oyeoo peyaa ycaaaec oca.

C O B M E C T M O C T T O B B paex oepax cpae peyec oece coecoc o.

aee a T2 ec coec o pcaa c o T1 (.e. oyco T1: = T2), ec oec oo ceyx yco:

- T1 T2 e oecee , o x e ec ao o cpyyp o, coepa ooey c ao o a oo cox ypoe;

- T1 T2 c coec opo a ae a T2 oaa aao oox ae T1;

- T1 T2 c eece a ae a T2 oaa aao oox ae T1;

- T1 ec eece o, a T2 ec eoce o;

- T1 T2 c cpoo a;

- T1 ec cpoo o, a T2 ec o Char;

- T1 ec cpoo o, aT2 ec yaoa cpoo o;

- T1 T2 c coec yaoa cpoo a;

- T1 T2 c coec a oec, ce ae a T2 oaa aao oox ae T1;

- T1 T2 c coec a yaaee;

- T1 T2 c coec poeyp a;

- T1 ec o poeyp o, a T2 ec poeypo ye c oece o peyaa, c e co apaepo oeceoc ey a apaepo;

- Oe a T2 coec o pcaa c oeo a T2, ec T2 axoc oac opeee T1;

- aae a P2, yaa a oea T2, coec o pcaa c yaaee a P1, yaa a oea T1, ec T2 e oac opeee T1.

Ha ae o oe aec cooee o oe, ec coecoc o pcaa eoxoa, a oo yco peyeo cca e oeo.

Ce o c o x o p o p a p o a aca popa eoxoo a, a ocyecec:

- o-o;

- apeece oece oepaop;

- yopoee oa (yco, , opopa);

- p cpyypoo ppapoa;

- aecoe pacpeeee a;

- aoy ccey;

- oco oeo-opepoaoo popapoa.

Bce popapoa, a C aca, e co ocoeoc, o oa eoxoo cpo y o , oo ocope, a o peaye ee, aa paoa.

B o o popaa e ee cca, ec e o ay-o opa. Bo oo pae opy, oopa ac o xooo ycpoca: a pa (coa opae), a aoae ycpoca (ce ecep), op oa/oa. Oepaop y oa-oa pee a. 7.

7 BBO-BBO ACA C B B O B B O Writeln (ee, ee, Fprintf (a, "ec c opaa....); ox eeo", cco eeo);

Write (ee, ee,...); Printf ("ec c opaa ox eeo", cco eeo);

Sprintf (cpoa, "ec c opaa ox eeo", cco eeo);

B B O B B O Read (ee, ee,...); Fscanf (a, "ec c opaa Readln (ee, ee,...); ox eeo", cco apeco eeo);

Scanf ("ec c opaa ox eeo", cco apeco eeo);

Pages:     | 1 |   ...   | 4 | 5 || 7 | 8 |   ...   | 21 |



2011 www.dissers.ru -

, .
, , , , 1-2 .