I,J:integer;
Suma:real;
Begin
TextBackGround (lightgray);
ClrScr;
TextColor (blue);
GotoXY (7,2);
Writeln (' ',
'I I I A(',N,'x',M,')');
Window (1,3,80,25);
{ i i}
for I:= 1 to N do
{ i i}
for J:= 1 to M do
begin
GotoXY (21,2);
TextColor (red);
Write ('i i [',i,',',j,']= ');
TextColor (black);
Read (a[i,j]);
ClrScr;
end;
{i i }
{i i }
GotoXY (30,2);
Writeln ('');
GotoXY (39,2);
Writeln ('');
TextColor (yellow);
{ i i}
for I:= 1 to N do
begin
Suma:= 0;
{ i i}
for J:= 1 to M do
Suma:= Suma+ a[i,j];
{i i }
GotoXY (30,3+I);
Writeln (I:3);
GotoXY (35,3+I);
Writeln (Suma:9:2);
end;
{i i }
Repeat Until KeyPressed;
End.
1.10. while repeat , .
4. y=Asin(x) p/2 p h=(p-p/2)/20 , , 3, 5 7.
Program Function_ASinx;
Uses Crt;
Var
A:integer;
y,x,h:real;
Begin
TextBackGround (lightgray);
ClrScr;
TextColor (blue);
GotoXY (6,1);
Writeln (' I "y=Asinx"');
TextColor (red);
Writeln (' ':13,'A',' ':4,'x',' ':6,'y');
TextColor (black);
Window (1,4,80,25);
A:=3;
h:=(pi-pi/2)/20;
{ i }
while A <=7 do
begin
x:=pi/2;
{ }
while x<=pi do
begin
y:=A*sin(x);
Writeln (' ':11,A:3,x:7:2,y:7:2);
x:=x+h;
end;
{ }
A:=A+2;
Readln;
ClrScr;
end;
{ i }
End.
2.
, . Search,Help .
2.1. y=10e-tcos(4t) t , e-t 0,1. 35.
2.2. y=23(1-e-3t) t , y 22,5. 35.
2.3. y=17e-t t , y 1,3. 35.
2.4. y=0,5t2-4t+6 t , y 0,2. D35.
|
|
2.5. y=5t t , y 99,9. 35.
2.6. y=19ln(t) t , y 45,3. F35.
2.7. y=14tg(t) t , y 345,3. 35.
2.8. y=33sin(3t) t , y 30,3. R35.
2.9. y=13-10e-t t , y 5,5. Q35.
2.10. y=6arctg(t) t , y 7,4. Z35.
3. Ͳ
3.1. .
3.2. .
3.3. .
3.4. for.
3.5. - .
3.6. .
3.7. .
3.8. .
3.9. .
3.10. .
3.11. .
3.12. .
3.13. .
' 4
ϲ ² ""
"" , Windows, Debug .
1. Ͳ ²Ҳ
1.1. ϳ , ' - . .
, . , , , ' . .
1.2. ϳ- , - '. -
Function <> ( < > ): < >;
|
|
< > , . ̳ ' . ; . . ,
Function Alfha(a,b:real; c:byte):real;
'. , ,
Function Beta:integer;
- , , ,
x:=2.5;
y:=3.9;
z:=7;
t:=2*Alfha(x,y,z);
1. z=xy+(2y)3x. - ab=e(b*ln(a) ).
Program Function_Program;
Uses Crt;
Var
x,y,z:real;
Function Stepin (a,b:real):real;
Begin
Stepin:=Exp(b*Ln(a));
End;
Begin
TextBackGround (lightgray);
ClrScr;
TextColor (blue);
GotoXY (6,2);
Writeln (' ');
TextColor (red);
GotoXY (9,4);
Write ('i Y: ');
TextColor (black);
Readln (x,y);
z:=Stepin(x,y)+Stepin(2*y,3*x);
TextColor (yellow);
GotoXY (9,7);
Writeln ('z= ',z:9:2);
Readln;
End.
1.3. ϳ- - .
Procedure <> ( < > );
< > , -, . , , - -. - , . - , . - Var, ,
Procedure Sorter (a,b:real; c:byte; Var x,y:real);
'. -, - , ,
Procedure Beep;
, , ,
t:=2.5;
h:=3.9;
z:=7;
Sorter(t,h,z,Alfha,Beta);
2. 35. .
Program Max_Array;
Uses Crt;
Const
n=3; m=5;
Type
Masiv=array [1..n,1..m] of real;
Var
A:Masiv;
Amax:real;
I,J:byte;
Procedure Max (X:Masiv; Var Xmax:real);
Var
k,p:byte;
Begin
Xmax:=x[1,1];
for k:=1 to n do
for p:=1 to m do
if x[k,p]>Xmax then Xmax:=x[k,p];
End;
Begin
TextColor (blue);
TextBackground (lightgray);
ClrScr;
GotoXY (21,2);
Writeln (' I');
Window (1,3,80,25);
for I:= 1 to n do
for J:= 1 to m do
begin
GotoXY (21,2);
TextColor (red);
Write ('i i [',i,',',j,']= ');
TextColor (black);
Read (a[i,j]);
ClrScr;
end;
Max (A,Amax);
GotoXY (21,2);
TextColor (red);
Write ('= ',Amax:9:2);
Repeat Until KeyPressed;
End.
1.4. . ³ ASCII. 25 80 (1,1) (80,25)
|
|
1.5. , . CRT
Uses CRT;
Window (x1,y1,x2,y2);
x1,y1 x2,y2, ,
Window (10,5,45,15);
ϳ , . , : , , .
Window (1,1,80,25);
1.6. 16 , 8. Write, Writeln.
CRT
TextColor ( < > );
TextBackGround ( < > );
. 1.1. .
Black () | DarckGray () | ||
Blue () | LightBlue () | ||
Green () | LightGreen () | ||
Cian () | LightCian () | ||
Red () | LightRed () | ||
Magenta () | LightMagenta ( ) | ||
Brown () | Yellow () | ||
LightGray () | White () |
,
TextColor (yellow);
TextColor (14);
, , , . ,
TextBackGround (blue);
ClrScr;
blink, 128, ,
TextColor (red+blink);
Write ('M ');
, .
3. , . , .
Program Menu;
Uses Crt;
Const
K= 3;
NameRegime: array[1..K] of string[50]=
(' 1 ',
' 2 ',
' 3 - ');
Var
J:integer;
I:Char;
Procedure Windows (X1, Y1, X2, Y2:integer);
Begin
TextBackGround (blue);
ClrSCr;
Window (X1+2, Y1+1, X2+2, Y2+1);
TextBackGround (black);
ClrScr;
Window (X1, Y1, X2, Y2);
TextBackGround (red);
ClrScr;
end;
Procedure Menu1;
Begin
Window (1,1,80,25);
ClrScr;
GotoXY (25, 13);
writeln (' - ');
repeat until KeyPressed;
End;
Procedure Menu2;
Begin
Window (1,1,80,25);
ClrScr;
GotoXY (25, 13);
writeln (' - ');
|
|
repeat until KeyPressed;
End;
BEGIN
while True do
begin
Windows (20, 7, 60, 17);
GotoXY (15, 3);
Write (' ');
for J:= 1 to K do
begin
GotoXY (9,4+J);
write (NameRegime[J])
end;
repeat
I:= ReadKey;
until ((I='1')or(I='2')or(I='3'));
Case I of
'1': Menu1;
'2': Menu2;
'3': begin
ClrScr;
TextMode (LastMode);
Halt
end;
end;
end;
END.
2.
"", . Windows, Debug .
2.1. 73. , , . : , , , .
2.2. 53. , , . : , , , .
2.3. 35. , , . : , , , .
2.4. 37. , , . : , , , .
2.5. 44. , , . : , , , .
2.6. 45. , , . : , , , .
2.7. 53. , , . : , , , .
2.8. 63. , , . : , , , .
2.9. 37. , , . : , , , .
2.10. 54. , , . : , , , .
3. Ͳ
3.1. .
3.2. .
3.3. .
3.4. - .
3.5. - .
3.6. .
3.7. -.
3.8. .
3.9. .
3.10. .
3.11. ³ .
3.12. .
3.13. .
' 5
² ϲͲ ""
"" , Options .
|
|
1. Ͳ ²Ҳ
1.1. "" , . i i , i, ii . i i i i . ii i , ii - i .
i: i, i.
1.2. i:
1) ii Var i, i i;
2) i Assign ' i i . , , ;
3) Reset Rewrite ' . i i i i;
4) i Write Read;
5) ϳ ' Close, i i i.
1.3. i i i. Ii i i i ASCII, i - . i .
i, ' , text. , f1
Var
f1: text;
', , f1 Data.pas,
Assign (f1, E:\EP21\Data.pas);
I' , . , , , i',
Assign (f1, Data.pas);
Data.pas i.
Reset (f1);
i i , Data.pas, .
Rewrite (f1);
Data.pas . Data.pas i, i .
, , Data.pas. Reset Rewrite,
Append (f1);
, Read Readln, , . , Data.pas
Read (f1, ,);
ii , Write Writeln, . , Data.pas D
Write (f1, C,D);
Writeln (f1);
Close (f1);
1.4. i , , , . , , , .
i, ' , . , f2 integer
Var
f2: file of integer;
', , f2 Inputa.out
Assign (f2, E:\EP22\Inputa.out);
Reset (f2);