.


:




:

































 

 

 

 


.




1. .

2. .

.

(MaxN) . ; - . .

Const

MaxN=5;

Type

Computer=record

Firma, namecomp:string[20];

Year:2000..2010;

Proizv:record

Scal, vect:Integer

End;

Price: Integer;

PriceToProizv:array[1..2] of real;

End;

Var

a: array[1..MaxN] of Computer;

I,j1,j2:Integer;

R1,r2:real;

Procedure In_Data; { }

Begin

Writeln( ̒);

With A[I],proizv do

Begin

Write( );

Readln(firma);

Write( comp);

Readln(namecomp);

Writeln( );

Readln(Year, Proizv, Scal, vect, Price);

PriceToProizv[1]:= price/scal;

PriceToProizv[2]:= price/vect;

End;

End;

BEGIN { }

Writeln;

For i:=1 to MaxN do

In_Data;

{ }

R1:=A[1].PriceToProizv[1]; j1:=1;{ }

R2:=A[1].PriceToProizv[2]; j2:=2; { }

For i:=2 to MaxN do

With A[I] do

Begin

If PriceToProizv[1]<r1 then

Begin

R1:=PriceToProizv[1]; j1:=i;

End;

If PriceToProizv[2]<r2 then

Begin

R2:=PriceToProizv[2]; j2:=i;

End;

End;

{ }

With A[j1],proizv do{ min / }

Writeln(firma, namecomp,Year:5, Scal:8, vect:8, Price:8, PriceToProizv[1]:7:2, PriceToProizv[2]:7:2);

With A[j2],proizv do{ min / }

Writeln(firma, namecomp,Year:5, Scal:8, vect:8, Price:8, PriceToProizv[1]:7:2, PriceToProizv[2]:7:2);

END.

.

: , , , , . 3 . , , , :

, ;

, , , ;

, .

 

Const

N=3;

Type

Product=(bread,butter,cheese,milk); { }

Assort=set of product; { }

Shop=array[1..n] of assort; { }

 

Var

M1:shop;

X: Product;

A,b,c,xm1: assort;

I,j,v,iw:integer;

BEGIN

For I:=1 to n do

Begin

Xm1:=[];

Writeln( ,I:2, - =);

Repeat

Read(iw);

Case iw of

1:x:=bread;

2:x:=butter;

3:x:=cheese;

4:x:= milk;

else

write( 1..4);

end; {case}

xm1:=xm1+[x]; { }

until eoln;

m1[1]:=xm1

end; { }

{ ,, }

A:=m1[1];

B:=[];

For I:=1 to 3 do

Begin

A:=A*m1[1]; ];{ }

B:=B+ m1[1{ }

C:=[ bread.. milk]-B; { }

End;

For I:=1 to 3 do

Begin

Case i of

1: Writeln(, );

2: Writeln( );

3: Writeln(, );

end;

For x:=bread to milk do

If x in a then

Case x of

Bread: Write( );

Butter: Write( );

Cheese: Write( );

Milk: Write( );

end; {case}

if I:=1 then a:=b

else

a:=c;

writeln

end

END.

 

:

1. .. . . - .: , 2005.

2. .. , .. Turbo Pascal .: -, 2005.

3. .. 7.0. .- .: - BHV, 2000.

4. .. .: , 2002

 

:

1. .. DELPHI: , -, [ ]: / .. , .. . . . .: -, 2014. 240 . : http://e.lanbook.com/books/element.php?pl1_id=64091

2. .. Microsoft Visual C ++ 2008 [ ]: / .. , .. , .. . . . .: . .. ( .. ), 2012. 140 . : http://e.lanbook.com/books/element.php?pl1_id=52414

3. .. . Pascal : [ ]: . . . : ( ), 2012. 212 . : http://e.lanbook.com/books/element.php?pl1_id=62777.

4. .. . Pascal : - [ ]: - / .. , .. , .. . . . : ( ), 2012. 116 . : http://e.lanbook.com/books/element.php?pl1_id=62440

5. , .. Delphi. 2 . 1. . [ ]: / .. , .. . . . .: -, 2013. 142 . : http://e.lanbook.com/books/element.php?pl1_id=5196

6. , .. ( ) [ ]: . . . .: , 2013. 590 . : http://e.lanbook.com/books/element.php?pl1_id=58700

7. , .. Free Pascal Lazarus: [ ]: / .. , .. . . . .: "" . .. ( .. ), 2012. 61 . : http://e.lanbook.com/books/element.php?pl1_id=63711

:

1. , .. [ ]: / .. , .. , .. . . . .: -, 2014. 245 . : http://e.lanbook.com/books/element.php?pl1_id=64090

2. , .. [ ]: / .. , .. , .. . . . .: " " ( ". "), 2014. 825 . :http://e.lanbook.com/books/element.php?pl1_id=66115

3. , .. [ ]:. . . .: " " ( ". "), 2015. 339 . : http://e.lanbook.com/books/element.php?pl1_id=66119

 

 





:


: 2016-11-20; !; : 593 |


:

:

: , .
==> ...

1479 - | 1456 -


© 2015-2024 lektsii.org - -

: 0.012 .