Program N2;
var M: Array [1..10] of Integer; Max: Integer; I: Byte;
begin Writeln(' 10 : ');
For I:= 1 to 10 do
begin Write('N',i,': ');
Readln(M[i]);
end;
Max:= M[1];
For I:= 1 to 10 do
if Max < M[i] then Max:= M[i];
Write(' : ', Max);
Readln;
end
% 1
.
% 2
10 .
% 3
15 .
% 4
10 .
% 5
15 .
GRAPH. 79 , , . GRAPH : CGA, MCGA, EGA, VGA, HERCULES, AT&T, 3270 PC. BGI.
:
program ;
USES GRAPH; { }
var GR,GM:integer;
begin
GR:=detect;
initgraph(gr,gm,' '); { GRAPH}
readln;
closegraph;
end.
INITGRAPH(, , '') - . - , . - integer, (GM). - TPU.
DETECT - .
CLOSEGRAPH - .
0 -
1 -
2 -
3 -
4 -
5 -
6 -
7 - -
8 - -
9 - -
10 - -
11 - -
12 - -
13 - -
14 -
15 -
:
- SETCOLOR() - ;
- SETBKCOLOR() - ;
- MOVETO(x,y) - x,y, ;
- LINETO(x,y) - x,y;
- LINEREL(Dx,Dy) - Dx,Dy;
- PUTPIXEL(x,y,) - ;
- LINE(x1,y1,x2,y2) - ;
- CIRCLE(x,y,r) - ;
- ARC(x,y, , ,r) - ( );
- ELLIPSE(x,y,.,.,Rx,Ry) - ;
- RECTANGLE(x1,y1,x2,y2) - , x1,y1 - , x2,y2 - ;
- BAR(x1,y1,x2,y2) - ;
- BAR3D(x1,y1,x2,y2,,false true) - ;
x1,y1 - ; x2,y2 - , true - , false - . - FILLELLIPSE(x,y,Rx,Ry) - ;
- SECTOR(x,y,.,.,Rx,Ry) - ;
- SETFILLESTYLE(,) - ;
:
0 -
1 -
2 - _ _ _
3 - ////
4 - ///
5 - \\\\
6 - \\\
7 - ++++
8 - x x x
9-
10 -
11 -
12 -
|
|
- FLOODFILL(x,y,, ) - ;
:
1.
program g1;
uses graph;
var gr,gm:integer;
begin
gr:=detect;
initgraph(gr,gm,' ');
setcolor(3);
setbkcolor(14);
setfillstyle(8,4);
fillellipse(100,100,30,50);
setfillstyle(2,2);
circle(200,200,50);
floodfill(200,200,3);
readln;
closegraph;
end.
2.
program g2;
uses graph,crt;
var d,r,e:integer;
{ }
begin
d:=detect;
initgraph(d,r,' ');
e:=graphresult;
if e<>grok then
writeln(grapherrormsg(e))
else
begin
setgraphmode(0);
repeat
setcolor(succ(random(4)));
line(random(getmaxx),random(getmaxy),
random(getmaxx),random(getmaxy))
until keypressed;
closegraph;end;
end.
, ..
- OUTTEXT() - ,
- OUTTEXTXY(x,y,) - , x,y
- SETTEXTSTYLE(,,) - ,
: 0 - , 1 - , 2 - , 3 - , 4 - ;
: 0 - - , 1 - - ;
: 1_32 , 1_10 - SETUSERCHARSIZE(x1,x2,y1,y2) -
USES GRAPH3 - "" .
.
:
- SHOWTURTLE -
- HIDETURTLE -
- FORWARD(n) - n
- BACK(n) - n
- TURTLEDELAY() -
- SETHEADING() - ( )
- SETPOSITION(x y) -
- HOME -
- PENDOWN -
- PENUP -
- SETPENCOLOR () - ,
- TURNRIGHT() - , -
- TURNLEFT() -
- TURTLEWINDOW(x,y,,) -
- XCOR__ YCOR__