You are on page 1of 5

4

1.
Pascal ()
.
.

(Windows), (DOS).
- Pascal - Turbo
(
DOS). -
,

.
Pascal
DOS - ,
.
() .

, .
() write writeln.
,
.
.
( , )
- write.
:
write (56) ;

( ): 56
write (12+5) ;

( ): 17
write (-1254:5) ;

( ): -1254
write (1254:6) ;

( ): __1254
write (1254:6,55:6) ;

( ): __1254____55
write
:
- ()
, ;
- , ,
;
-
. -
. ,
:. 3 5 .
-
( ) (blank ) ( 5 6).
- write
().
- .
.

write
. .
, .
.
.

writeln. write,
. :
writeln (1245:6) ; write (21534:8) ;
:
__1254
___21534
.
write writeln
. :
- , ;
- ;
- .
:
R[:m[:n]], R , m - n .
. ,
m n .
: R:m:n; R:m; R. (R =
12.134):
writeln (R:9:4) ;

( ): __12.1340
writeln (R:10:5) ;

( ): __12.13400
writeln (R+1:10:5) ;

( ): __13.13400
writeln (R:10) ;

( ): 1.2134E+01
writeln (R:11) ;

( ): 1.21340E+01
(R:m) m<8 m=8, -
.
( R)
m=17:
writeln (R) ;

( ): _1.2134000000E+01
m
, , n .

(
)
writeln ( R : ,R) ;
:
R : 1.21340E+01
.
, Pascal
. (
), .
read readln.
:

Var a, b, c, d, e : integer ;
read (a,b) ;
: 11_24
a b a=11 b=24.
:
read (a) ;
read (b) ;
read (a) read (b,c,d) ;

: 11_24_14_35_46
: a=11; b=24; c=14; d=35
:
- read ,
;
-
(), ;
- , ;
-
, .
readln.
readln:
Var i, j, k, l, m : integer ;
readln (i,j) ;
readln (k) ;
read (m,n) ;

11_24_48
32_44_88
12_23_11
: i=11 ; j=24; k=32; m=12; n=23.

:
Var x, y, z, x1, x2 : integer ;
readln (x,y) ;
readln (z, x1, x2) ;

2.33_2.54_4.28
-32.43_4.54_8.48
: x=2.33 ; y=2.54; z=-32.43; x1=4.54; x2=8.48.
.
true
false.
2. Crt
- Turbo
Crt. ,
.
uses:
uses Crt ;
,
Crt.
: ClrScr.
, -

- . ,
Crt

Program Test ;
uses.
uses Crt;
Var a,b,x,r,d,: real ;
begin
GotoXY (x,y).
ClrScr ;

write ( , b r:) ;

read (a,b,r) ;

x:=a+b*r ;
.
writeln ( x:, x) ;

end .
x y.
. :
GotoXY (10,15) ;
writeln ( ) ;
writeln ( ) ;
Pascal 10- ,
15- .
1- .
Sound (Hz), Delay (ms), NoSound.
Sound (Hz) .
Hz word ( ). Hz
. NoSound
Sound.
Delay (ms). ms
word. [ms],
. :
Sound (440) ; { }
Delay (500) ;
NoSound ;
440 Hz ( )
500 ms.
.
3. Pascal.
.
;. ,
,
.
. Pascal
begin end.
.
begin
d:=-b*b-4*a*c ;
d:=sqrt(d) ;
end
end ;.
Pascal, .

, .
;. :
d:=-b*b-4*a*c ; ; ;. 2 .

You might also like

  • Неолиберализмът
    Неолиберализмът
    Document15 pages
    Неолиберализмът
    Stanil Stoev
    No ratings yet
  • NMAP
    NMAP
    Document20 pages
    NMAP
    Stanil Stoev
    No ratings yet
  • NMAP
    NMAP
    Document20 pages
    NMAP
    Stanil Stoev
    No ratings yet
  • NMAP
    NMAP
    Document20 pages
    NMAP
    Stanil Stoev
    No ratings yet
  • Fundirane
    Fundirane
    Document152 pages
    Fundirane
    Stanil Stoev
    No ratings yet
  • Using Excel
    Using Excel
    Document20 pages
    Using Excel
    Stanil Stoev
    No ratings yet
  • Lect 09
    Lect 09
    Document10 pages
    Lect 09
    Stanil Stoev
    No ratings yet
  • Lect 03
    Lect 03
    Document8 pages
    Lect 03
    Stanil Stoev
    No ratings yet
  • Lect 08
    Lect 08
    Document12 pages
    Lect 08
    Stanil Stoev
    No ratings yet