:
{ }
Const { }
pi = 3.1415926; { , }
{ }
Var { }
R, L: real; { R L }
{ }
{ , }
Begin { }
Read (R); { }
L:= 2*pi*R; { ! }
Write( , L); { }
End. { }
, 쳺 read write, .
.
5: , = := , : 1) = 2) , =.
:= . 100 . 50 . ? ³, 150 . , , . := + b 㳺 , , , b , . , :=, =, , = , = + 50, , 100 150 . , , , ! , := , : =.
. L = 2pR, 쳺, , 쳺 , 6: , , Ⳕ 쳺. , Ⳕ . , !
, . 1, , .
ϳ .
, , . .
|
|
. , , , , , , .. , .
. , Pascal:
n 0 255 Byte;
n 0 65 535 Word;
n 32 768 32 767 Integer;
n 2 147 483 648 2 147 483 647 Longint;
n 2.9'10-39 1.7'1038 Real;
n 1.5'10-45 3.4'1038 Single;
n 5.0'10-324 1.7'10308 Double;
n 3.4'10-4932 1.7'104932 Extended;
:
n , Char;
n , , String.
, , :
ij | ||||
Shortin | -128..127 | 3 | ||
Byte | 0..255 | 3 | ||
Word | 0..65535 | 5 | ||
Integer | -32768..32767 | 5 | ||
Longint | 2147483648..2147483647 | 10 | ||
Single | 1.5'10-45 3.4'1038 | 8 | ||
Real | 2.9'10-39 1.7'1038 | 12 | ||
Double | 5.0'10-324 1.7'10308 | 16 | ||
Extended | 3.4'10-4932 1.7'104932 | 20 |
1. ֳ
, 쳿 .
, , , , . , ᒺ . , , , , , . : .
. , .
Const, . ( ) , . 쳺 , в .
|
|
Var . Pascal Boolean, , . : true false, . 1 0, . , . .
: , .
, , , , . , , , , , .
: , , : , . , , :
n , : , ;
n ( ) , ;
n , , , , .
-
, () (). . Pascal , : Read (Readln) Write (Writeln), () (, ) . ln ( line new).
, , .., . , ,
Write(s1, t, , man);
, sl, t, man. ³ ln , , . , , .
, . , :
|
|
write(s:n:m); {s real, n,m integer}
n ;
m .
, , . ,
write(10*pi:1:3);
, :
program demowrite1;
uses crt;
begin
clrscr; { }
write(10*pi:1:3);
readln;
end.
31.416.
uses crt; . , crt. , . , crt, , , . , ᒺ , , . , .
, crt:
n ClrScr ;
. 1 |
n Gotoxy(x,y) (,). . , . 1. , . , Y . :
0 _ _ 79
0 _ _ 24
80 25 .
, , , .
n TextColor (color); .
( ), 쳺, . 2:
Black | ||
Blue | ||
Green | ||
Cyan | ||
Red | ||
Magenta | ||
Brown | ||
LightGrey | ||
DarkGrey | ||
LightBlue | ||
LightGreen | ||
LightCayn | ||
LightRed | ||
LightMagenta | ||
Yellow | ||
White |
2. crt.
, Color 0 255, (CGA, EGA, VGA ..), .
n TextBackGround (color); .
n Delay (Time); . (. ).
n Sound (n); n ( Sound !).
n NoSound; .
. , , , crt .
, , , . , , , .
|
|
, 䳿, . , , , . . , , , . , . ϳ . . , .