80867
3
20

3.2


- opis()


- teoria()

-: : S=/n/
And s1=/n/




Telo()



3.3

#include <graphics.h>

#include <stdlib.h>

#include <stdio.h>

#include <conio.h>

#include <dos.h>

#include <ctype.h>

#include "steps.h"

int main(void)

{

int gdriver = DETECT, gmode, errorcode,i;

initgraph(&gdriver, &gmode, "");

errorcode = graphresult();

if (errorcode != grOk)

{ printf("Graphics error: %s\n", grapherrormsg(errorcode));

printf("Press any key to halt:");

getch(); exit(1); }

menu:

cleardevice();

setbkcolor(BLACK);

settextjustify(LEFT_TEXT, LEFT_TEXT);

settextstyle(DEFAULT_FONT, HORIZ_DIR, 1);

setfillstyle(SOLID_FILL,15);

setcolor(WHITE);

rectangle(0,0,getmaxx(),getmaxy());

setcolor(RED);

outtextxy(20,64,"-, + - , Enter - ");

settextstyle(DEFAULT_FONT, HORIZ_DIR, 2);

settextjustify(0, 1);

setcolor(BLUE);

outtextxy(10,12,"");

outtextxy(180,30,"*** M E ***");

outtextxy(10,45,"‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑");

setcolor(RED);

outtextxy(30,100,"1. ");

outtextxy(30,150,"2. ");

outtextxy(30,200,"3.");

outtextxy(30,250,"4.");

int y=80,y1=120;

char x;

setcolor(14);

rectangle(15,y,620,y1);

m1:

x=getch();

switch (toascii(x))

{

case 43: if (y==230)

{

setcolor(BLACK);

rectangle(15,y,620,y1);

y=80; y1=120;

setcolor(14);

rectangle(15,y,620,y1);

goto m1;

}

setcolor(BLACK);

rectangle(15,y,620,y1);

y=y+50;

y1=y1+50;

setcolor(14);

rectangle(15,y,620,y1);

goto m1;

case 45: if (y==80)

{

setcolor(BLACK);

rectangle(15,y,620,y1);

y=230;

y1=270;

setcolor(14);

rectangle(15,y,620,y1);

goto m1;

}

setcolor(BLACK);

rectangle(15,y,620,y1);

y=y-50;

y1=y1-50;

setcolor(14);

rectangle(15,y,620,y1);

goto m1;

case 13: for (i=0;i<1;i++)

{

setcolor(BLUE);

rectangle(15,y,620,y1);

sound(100);

delay(100);

setcolor(14);

rectangle(15,y,620,y1);

sound(200);

delay(100);

}

nosound();

switch(y)

{ case 80: teoria();

goto menu;

case 130: opis();

goto menu;

case 180: telo();

goto menu;

case 230: goto door;

}

goto m1;

default:

goto m1;

}

door:

closegraph();

return 0;

}

Steps.h

void step1()

{

setcolor(15);

int a10[10]={395,372, 403,378, 548,194, 540,188, 395,372};

drawpoly(5,a10);

int a11[8]={404,361, 382,345, 509,183, 531,199};

drawpoly(4,a11);

setfillstyle(9,7);

floodfill(383,345,15);

setfillstyle(2,9);

floodfill(396,372,15);

}

void step2()

{

setcolor(15);

int a11[10]={395,370, 405,375, 480,165, 470,160,395,370};

drawpoly(5,a11);

int a10[8]={400,355, 375,345, 440,165, 465,175};

drawpoly(4,a10);

setfillstyle(9,7);

floodfill(383,345,15);

setfillstyle(2,9);

floodfill(396,369,15);

}

void step3()

{

setcolor(15);

setfillstyle(9,7);

rectangle(366,355,395,165);

floodfill(370,340,15);

setfillstyle(2,9);

rectangle(395,148,405,372);

floodfill(396,150,15);

}

void step11()

{

setcolor(GREEN);

setfillstyle(SOLID_FILL,GREEN);

int a10[10]={395,372, 403,378, 548,194, 540,188, 395,372};

fillpoly(5,a10);

int a11[8]={404,361, 382,345, 509,183, 531,199};

fillpoly(4,a11);

}

void step22()

{

setcolor(GREEN);

setfillstyle(SOLID_FILL,GREEN);

int a11[10]={395,370, 405,375, 480,165, 470,160,395,370};

fillpoly(5,a11);

int a10[8]={400,355, 375,345, 440,165, 465,175};

fillpoly(4,a10);

}

void step33()

{

setcolor(GREEN);

setfillstyle(SOLID_FILL,GREEN);

bar3d(366,355,395,165,0,0);

bar3d(395,148,405,372,0,0);

}

void voice()

{ sound(25);

delay(4);

nosound(); }

void teoria()

{

int x,i;

cleardevice();

FILE *file1;

char s, s1=' ';

if ((file1=fopen("tr.txt","r"))==NULL)

{ perror(" ! \n");

exit(1); }

while (!kbhit())

{ s=fgetc(file1);

if (s==EOF) break;

if (s=='\n' && s1=='\n') delay(1500);

printf("%c", s);

voice(); delay(10); s1=s; }

fclose(file1);

getch();

}

void telo(void)

{

int i,j,I,U,M,t,T;

setbkcolor(GREEN);

cleardevice();

settextjustify(LEFT_TEXT, LEFT_TEXT);

settextstyle(DEFAULT_FONT, HORIZ_DIR, 1);

setcolor(15); setfillstyle(SOLID_FILL,15);

printf(" ");

printf("\n (1-3): ");

scanf("%d",&I);

printf(" (110-220): ");

scanf("%d",&U);

printf(" (100-300): ");

scanf("%d",&M);

printf(" (1-3): ");

scanf("%d",&t);

printf(" (15-25): ");

scanf("%d",&T);

//VINT

bar3d(85,254,185,266,0,0); bar3d(67,237,85,283,0,0);

int a1[10]={376,215, 185,239, 185,281, 376,305, 376,215};

fillpoly(5,a1);

//kryuchok

arc(381,260,270,180,5);

arc(381,260,270,180,4);

//Blok

int a2[14]={95,140, 395,140, 395,148, 103,148, 103,245, 95,245, 95,140};

drawpoly(7,a2);

int a3[12]={365,148, 365,172, 127,172, 127,250, 103,250, 103,245};

drawpoly(6,a3);

line(365,172,365,180);

line(365,180,127,180);

int a4[14]={95,380, 395,380, 395,372, 103,372, 103,275, 95,275, 95,380};

drawpoly(7,a4);

int a5[12]={365,372, 365,348, 127,348, 127,270, 103,270, 103,275};

drawpoly(6,a5);

line(365,348,365,340); line(365,340,127,340);

setfillstyle(5,9);

floodfill(97,142,15); floodfill(100,372,15);

setfillstyle(9,7);

floodfill(105,162,15); floodfill(125,300,15);

setfillstyle(4,3);

floodfill(355,178,15); floodfill(360,342,15);

//Vnut blok

int a6[12]={348,188, 348,215, 157,239, 157,254, 127,254, 127,250};

drawpoly(6,a6);

int a7[12]={348,332, 348,305, 157,281, 157,266, 127,266, 127,270};

drawpoly(6,a7);

int a8[68]={127,188, 140,188, 140,195, 153,195, 153,188, 166,188, 166,203, 179,203, 179,188, 192,188, 192,195, 205,195, 205,188, 218,188, 218,203, 231,203, 231,188, 244,188, 244,195, 257,195, 257,188, 270,188, 270,203, 283,203, 283,188, 296,188, 296,195, 309,195, 309,188, 322,188, 322,203, 335,203, 335,188, 348,188};

drawpoly(34,a8);

setfillstyle(6,8);

floodfill(130,190,15);

int a9[68]={127,332, 140,332, 140,317, 153,317, 153,332, 166,332, 166,325, 179,325, 179,332, 192,332, 192,317, 205,317, 205,332, 218,332, 218,325, 231,325, 231,332, 244,332, 244,317, 257,317, 257,332, 270,332, 270,325, 283,325, 283,332, 296,332, 296,317, 309,317, 309,332, 322,332, 322,325, 335,325, 335,332, 348,332};

drawpoly(34,a9);

setfillstyle(6,8);

floodfill(130,330,15);

//spiral

setcolor(BLUE);

for(i=146,j=173;i<=310;i=i+52,j=j+52)

{ circle(i,191,3);

circle(j,329,3); }

for(i=172,j=146;i<=340;i=i+52,j=j+52)

{ circle(i,199,3);

circle(j,321,3);}

//krishka

step1();

//move

int k;

for(k=0;k<19;)

{

setcolor(GREEN);

setfillstyle(SOLID_FILL,15);

bar3d(85-k,254,185-k,266,0,0); bar3d(67-k,237,85-k,283,0,0);

a1[0]=376-k; a1[2]=185-k; a1[4]=185-k; a1[6]=376-k; a1[8]=376-k;

fillpoly(5,a1);

arc(381-k,260,270-k,180,5); arc(381-k,260,270-k,180,4);

k++;

setcolor(15);

bar3d(85-k,254,185-k,266,0,0); bar3d(67-k,237,85-k,283,0,0);

arc(381-k,260,270-k,180,5); arc(381-k,260,270-k,180,4);

a1[0]=376-k; a1[2]=185-k; a1[4]=185-k; a1[6]=376-k; a1[8]=376-k;

fillpoly(5,a1);

delay(100);

}

delay(1000);

step11();

step2();

delay(1000);

step22();

step3();

delay(2000);

setcolor(YELLOW);

for(i=146,j=173;i<=310;i=i+52,j=j+52)

{ circle(i,191,3);

circle(j,329,3); }

for(i=172,j=146;i<=340;i=i+52,j=j+52)

{ circle(i,199,3);

circle(j,321,3);}

delay(2000);

setcolor(RED);

for(i=146,j=173;i<=310;i=i+52,j=j+52)

{ circle(i,191,3);

circle(j,329,3); }

for(i=172,j=146;i<=340;i=i+52,j=j+52)

{ circle(i,199,3);

circle(j,321,3);}

delay(2000);

setcolor(LIGHTRED);

for(i=146,j=173;i<=310;i=i+52,j=j+52)

{ circle(i,191,3);

circle(j,329,3); }

for(i=172,j=146;i<=340;i=i+52,j=j+52)

{ circle(i,199,3);

circle(j,321,3);}

delay(2000);

step33();

step2();

delay(1000);

step22();

step1();

for(k=25;k>0;)

{

setcolor(GREEN);

setfillstyle(SOLID_FILL,15);

bar3d(85-k,254,185-k,266,0,0); bar3d(67-k,237,85-k,283,0,0);

a1[0]=376-k; a1[2]=185-k; a1[4]=185-k; a1[6]=376-k; a1[8]=376-k;

fillpoly(5,a1);

arc(381-k,260,270-k,180,5); arc(381-k,260,270-k,180,4);

k--;

setcolor(15);

bar3d(85-k,254,185-k,266,0,0); bar3d(67-k,237,85-k,283,0,0);

arc(381-k,260,270-k,180,5); arc(381-k,260,270-k,180,4);

a1[0]=376-k; a1[2]=185-k; a1[4]=185-k; a1[6]=376-k; a1[8]=376-k;

fillpoly(5,a1);

delay(100);

}

for(i=1;i<25;i++) printf("\n");

printf(" ");

printf("\n : %d",I);

printf("\n : %d",U);

printf("\n : %d",M);

printf("\n : %d min",t);

printf("\n : %d C",T);

printf("\n : %d C",T+t*9);

printf("\n : %d",((T+t*9)-T)*2);

getch();

}

void opis(void)

{

int i,j,I,U,M,t,T;

setcolor(15); setfillstyle(SOLID_FILL,15);

cleardevice();

settextjustify(LEFT_TEXT, LEFT_TEXT);

settextstyle(DEFAULT_FONT, HORIZ_DIR, 1);

setbkcolor(GREEN);

//VINT

rectangle(85,254,185,266);

rectangle(67,237,85,283);

int a1[10]={376,215, 185,239, 185,281, 376,305, 376,215};

drawpoly(5,a1);

line(70,250,50,250);

outtextxy(10,250,"");

//kryuchok

arc(381,260,270,180,5);

arc(381,260,270,180,4);

line(381,260,420,160);

outtextxy(420,160,"");

//Blok

int a2[14]={95,140, 395,140, 395,148, 103,148, 103,245, 95,245, 95,140};

drawpoly(7,a2);

int a3[12]={365,148, 365,172, 127,172, 127,250, 103,250, 103,245};

drawpoly(6,a3);

line(365,172,365,180);

line(365,180,127,180);

int a4[14]={95,380, 395,380, 395,372, 103,372, 103,275, 95,275, 95,380};

drawpoly(7,a4);

int a5[12]={365,372, 365,348, 127,348, 127,270, 103,270, 103,275};

drawpoly(6,a5);

line(365,348,365,340);

line(365,340,127,340);

setfillstyle(5,9);

floodfill(97,142,15);

floodfill(100,372,15);

setfillstyle(9,7);

floodfill(105,162,15);

floodfill(125,300,15);

setfillstyle(4,3);

floodfill(355,178,15);

floodfill(360,342,15);

line(300,100,300,145);

outtextxy(300,100,"");

line(280,120,280,155);

outtextxy(280,120,"");

line(250,80,250,175);

outtextxy(250,80,"");

//Vnut blok

int a6[12]={348,188, 348,215, 157,239, 157,254, 127,254, 127,250};

drawpoly(6,a6);

int a7[12]={348,332, 348,305, 157,281, 157,266, 127,266, 127,270};

drawpoly(6,a7);

int a8[68]={127,188, 140,188, 140,195, 153,195, 153,188, 166,188, 166,203, 179,203, 179,188, 192,188, 192,195, 205,195, 205,188, 218,188, 218,203, 231,203, 231,188, 244,188, 244,195, 257,195, 257,188, 270,188, 270,203, 283,203, 283,188, 296,188, 296,195, 309,195, 309,188, 322,188, 322,203, 335,203, 335,188, 348,188};

drawpoly(34,a8);

setfillstyle(6,8);

floodfill(130,190,15);

int a9[68]={127,332, 140,332, 140,317, 153,317, 153,332, 166,332, 166,325, 179,325, 179,332, 192,332, 192,317, 205,317, 205,332, 218,332, 218,325, 231,325, 231,332, 244,332, 244,317, 257,317, 257,332, 270,332, 270,325, 283,325, 283,332, 296,332, 296,317, 309,317, 309,332, 322,332, 322,325, 335,325, 335,332, 348,332};

drawpoly(34,a9);

setfillstyle(6,8);

floodfill(130,330,15);

//spiral

setcolor(4);

for(i=146,j=173;i<=310;i=i+52,j=j+52)

{ circle(i,191,3);

circle(j,329,3); }

// setcolor(4);

for(i=172,j=146;i<=340;i=i+52,j=j+52)

{ circle(i,199,3);

circle(j,321,3);}

setcolor(15);

line(146,192,146,100);

outtextxy(146,100,"");

line(136,200,136,80);

outtextxy(136,80,"");

line(170,250,170,450);

outtextxy(170,450,"");

line(370,250,370,450);

outtextxy(370,450," ");

//krishka

int a10[10]={395,372, 403,378, 548,194, 540,188, 395,372};

drawpoly(5,a10);

int a11[8]={404,361, 382,345, 509,183, 531,199};

drawpoly(4,a11);

setfillstyle(9,7);

floodfill(383,345,15);

setfillstyle(2,9);

floodfill(396,372,15);

line(470,250,470,400);

outtextxy(470,400,"");

getch(); getch();

}


3.4

. 1. .

. - + Enter . .

. 2.

, . .2.


. 3. .

. , , . .3.

. 4. .

, . .4.


. 5. .

, .5.

. 6. .

.


. 7. - .

(..7.).

. 8. .

(. . 8.).


. 9. .

.9.


, . . , , .

- , . , .


1. .. . 1972.

2. .. . . . . 1975.

3. .. . . . 1976.

4. .. , .. . . 1978.

5. .. . .1987.

6. .. . .

7. .. . . 1987.

8. .. , .. . .

9. .. . . . . 1981.

10. .. , .. . .1978.

11. .. . . 2. . . 1975.

12. .. . . 1. . 1973.


« - »
:
: 80867
: 3
: 20

102471
0
17

... Exit <Enter>. 14. 4- 13-. 2.3 - Program Water_Program; Uses Crt, Graph; Const { Vvod Unit Graphics } FunWeb='c:tpBgi'; Var Gd,Gm,I,X,Y,X1,Y1,XX,YY,Rad,J:Integer; Z,J1,J2,W,V,G:Integer; ...

235892
25
6

... - , Turbo-Pascal . , . ...

107365
2
8

... , , Restart . . . , , . {Wait Icon Erase Icon) . ...

146463
19
10

... . 6. . , ...

0