.


:




:

































 

 

 

 


.




ü .

ü , - .

.

1. .

2. .

.

.

1. .

2. .

3. .

, .

2

. (2 )

:

1. , .

2. , .

3. .

  . (095)207-9464 (095)923-2906 , 6/8
  (095)978-0443 (095)978-1693 , 14/19
  (095)152-4001 (095)152-4251 -, 16

4. . , . : 1010 2,4,6,9; 1020 3,5,8,11; 1030 1,7,10,12.

5. . .

6. , , .

:

.

1. .

2. , , .

3. , , .

4. .

5. .

.

.

1. , , , .

2. , .

3. .

4. ( ).

5. , !.

6. , .


4

: .

: (Pascal)

- : 15.( ) 1.(); academy; AcerX 1263; ; ; ABCPascal.

: 2.

:

1. ;

2. ;

3. , .

 

 

3 :

1. ;

2. - 0..9

3. - (+,-,*,/,=,<,>,<>,<=,>=,.:;{}:= ()), :and, begin,const,div,do,else,for, .. .

- , , . , .

- , .

:

And goto set
array implementation shl
begin in shr
case interface string
const label then
div mod text
Do nil to
Downto not type
Else of unit
End or until
File pointer uses
Far procedure var
For program while
Forward record with
Function repeat xor

 

:

 
Shortint -128127
  Integer -3276832767
  Longint -21474836482147483647
  Byte 0255
  Word 065535
Real 2.9 10-391.7 1038 11..12
  Single 7..8
  Double 15..16
  Extended 19..20
Boolean True, False
Char 1
String , 256
array  
file  
record  

 

abs(x) - , ..

exp(x) - .

sin(x) cos(x) , .

arctan(x) - .

ln(x) - (>0)

sqr(x) - .

sqrt(x) - .

random(x) - 0<=...< x

Pi- .

odd(x) - true, , false .

inc(x,n) - n.

dec(x,n) - n.

int(x) - .

frac(x) - .

trunc(x) - longint.

round(x) - .

 

.

1. , , . .

2. .

3. - . ([{ )

4. 2 .

5. :

1) ;

2) * / DIV ( ), MOD ( )

3) + -

 

(:=).{}:= {, , , }

: x:=y; x:=y+z;x:=abs(y-z); x:=12;

read( ), readln( ), ln .

: readln(f,b,a); read(s);

 

:

Program< >;

< >

Begin

< >

End.

 

Begin {}

; ;

End. {}

: begin end.

 

, , .

:

if<>then<1>else<2>;

: else .

 

1.1. (1,2:36+1,2:0,25+cos2):7,24.

, :

 

  Program primer1_1; Begin Write('=',1.2/36+1.2/0.25+cos(2))/7.24); End.
 
  Program primer1_1; Var P:real; Begin P:=1.2/36+1.2/0.25+cos(2))/7.24; Write('=',P); End.  

 

1.2. :

-15 .

 

Program primer1_2;

Begin

Writeln('');

Write(' -15');

Write(' ');

End.

 

1.3. .

 

Program primer1_3;

Var a1,a2,a3:char;

Begin

Writeln( );

Readln(a1,a2,a3);

Writeln(1-,a1);

Writeln(2- ,a2);

Writeln(3- ,a3);

End.

 

1.4. .

 

Program primer1_4;

Var a1,a2:integer; a3,a4:real;

Begin

Writeln( 1-);readln(a1);

Writeln( 2-);readln(a2);

Writeln( 3-);readln(a3);

Writeln( 4-);readln(a4);

Writeln(Ғ);

writeln(1-,a1);

writeln(2-,a2);

writeln(3-,a3);

writeln(4-,a4);

End.

 

1.5. max(X+Y+Z,XYZ), .

 

Program primer1_5;

Varx,y,z:integer;

Max:integer;

Begin

Writeln(x,y,z);

Readln(x,y,z);

If (x+y+z)> x*y*z then max:=x+y+z else max:=x*y*z;

Writeln( =,max);

End.

 

1.6. f(x) .

Program primer1_6;

Varx,y:real;

Begin

Writeln();

Readln(x);

If x>0 then y:=x;

If x=0 then y:=0;

If x<0 then y:= -sqr(x);

Writeln( =,x);

Writeln( f(x)=,y);

End.

 

1.7. , -2 13. :

1. -2. , ;

2. 13. , , -2< <13

 

1   Program primer1_7; Var x:integer; Begin Writeln(Ւ); Readln(x); If x>-2 then Ifx<13 then writeln(x=,x, ) elsewriteln( ); end.   2   Program primer1_7; Var x:integer; Begin Writeln(Ւ); Readln(x); If (x>-2) and (x<13) then writeln(x=,x, ) elsewriteln( ); end.  

1.8. , , 1000 ., 3% .

, , , . , 100 ., , .

 

Program primer1_8;

Var sum,sumsk,skidka:real;

Begin

Writeln( );

Readln(sum);

If sum>1000 then

Begin

skidka:=sum*0.03;

sumsk:=sum-skidka;

writeln(=,skidka);

writeln( =,sumsk);

end

else

writeln( =,sum);

end.

 






:


: 2016-12-05; !; : 309 |


:

:

, - , ; , - .
==> ...

1267 - | 1298 -


© 2015-2024 lektsii.org - -

: 0.037 .