. , , ,

,,,

" " — ,

. , . , .

- -. . . , , -, -. . . , , , , . , , , , .. , - .

, - , , . , , - , . . - , , , . - , .

, ( , , , ) . (: , ). , , , , , . , , . (-, .), ( , 1-2, , .). , . ( : , , -). , . , . . , , . , .

. , , .

. . - . - , . , . . , . . . . , .


1

1.1.

(, , ). , . . , , . : , , .

: ( : MS-DOS X.X, WINDOWS 3.X, WINDOWS 95, DR-DOS ... ).

: .

: . . , . , , .

. , .. , . . ( , , ). , . ( , .. ). . . , , . :

1. . , . . ( , - , , , ), . . , .

2 . , . , . , .

. ( ) . . .. . . . . .

3 . . . . . . . . . , . , . , . . . , , . .. .

. . .

, , , .. , . ( ). . ( , ... ) .

C++. . , , , , . Watcom Systems Inc. . , , .. , , . IBM PC , Intel 386 . . . , (i80286, i80186, i8086) .. . Intel : , . VGA. . , .

1.2 Š

, - , , .

- . , - . . , : , ( ) , , , .

. , . . : .

. 젠 - . . . .

: C,F,L,M,P,PL,T,W,V. *, , . , , .

x,y, r color

Ѡ x,y,r,color

C 120,50,40,3

F

filename

F filename

F exit.bil

L

( x1,y1,x2,y2 c color

L x1,y1,x2,y2,color,command

command L,F B

L- , F- , B-

L 10,10,20,20,7,L 10,10,20,20,1,B 10,10,20,20,2,F

N, (color=1), - x1,y1,x2,y2 ... xn, yn, xn, yn,

M N x1,y1,x2,y2,color ......... xn ,yn, xn, yn, color

M

2 81,127,185, 147, 2

81,152,185,172, 1

P

color1, color x, y

P x,y,color,color1

P 30,26,3,2

PL

xn, yn , color , x1,y1,x2,y2, PL,0-

PL x1,y1,x2,y2,color xn, yn

PL,0

PL 120,120,130,130,3 140,132 23,51 PL,0

T

text x1,y1, color, XOR- ,

T x1,x2,color,text, XOR

T 5,5,3,,XOR

W

filename x1,x2 .. x1,x2 -

W filename x1,x2

W zastavka 90,90

V

filename x1,x2 m

V filename x1,y1,m

V avto_100 100,100,300

: -aspect = maxx/(m-x1) ; maxx- .

.. W V . . .


2

2.1

Watcom ++, . .

char *massiv,*massiv1,*temp,*buff_image,command,mode='c',key;

unsigned char f_mask[ 8 ] = { 255, 255, 255, 255,255, 255, 255, 255 };

unsigned char name[20],subname[20],massiv2[45];

char fon_buff[10];

int color=0,color1=0,punkt=1,m_x,m_y,m_k=0,row=20,maxx=640;

float x=0,y=0,x1=0,y_1=0,radius=0,xs=0, ys=0,ratio=1.000,asp=640,aspxs=1;

#define ENTER 0x0d

#define PGDW 0x51

#define PGUP 0x49

#define UP 0x48

#define DOWN 0x50

#define ESC 0x1b

#define SPACE 0x20

#include "graph.h"

#include "pgchart.h"

#include "stdarg.h"

#include "stdio.h"

#include "iostream.h"

#include "fstream.h"

#include "conio.h"

#include "stdlib.h"

#include "math.h"

#include "string.h"

#include "dos.h"

void mouse (int on_off_xy, int *m_x,int *m_y,int *m_k) ;

void virusprot (void);

void grinit (void) ;

void outmenu (void);

void outcursormenu(int punkt);

void choise_cont_educ(char file[]);

void education(int index,int quest_num);

void outresult(int mark,char mode) ;

void getout(void );

void any_key(void);

void calcxy(void);

void clrbuff(void);

void draw_win(int x,int y,char msg[]) ;

void goodbye(void);

void inp_data(unsigned char data[]);

void inputfio(void);

void mouse (int on_off_xy, int *m_x,int *m_y,int *m_k);

void timeout () ;

void savefio (int mark ) ;

int picture (int count, char massiv[], int index);

int choisebil(void);

int choiserandombil(void) ;

int control(int index,int quest_num,int mark,int minute,int *timeout);

int fileop (char file[],char massiv[] ) ;

int msv_tmp(int count,char massiv[]) ;

void main() {

if (!(massiv =new char [20000])){cout<<"Íåõâàòàåò ïàìÿòè";exit(1);}

if (!(buff_image=new char [4000 ])){cout<<"Íåõâàòàåò ïàìÿòè";exit(1);}

if (!(massiv1 =new char [20000])){cout<<"Íåõâàòàåò ïàìÿòè";exit(1);}

if (!(temp =new char [100 ])){cout<<"Íåõâàòàåò ïàìÿòè";exit(1);}

grinit();

virusprot();

while(1) {

int bilnum=1;

char file[13];

outmenu();

label1:

punkt=menu();

if (punkt==1) {mode='c'; bilnum=choiserandombil();}

if (punkt==2) {mode='e';bilnum=choisebil();}

if (punkt==3) {getout();goto label1;}

sprintf( file, "%d.bil", bilnum );

choise_cont_educ(file);

}

}

void grinit (void) {

int mode, n;

mode = _ERESCOLOR;

struct videoconfig vc;

if( _setvideomode( mode ) == 0 ) {

puts( "Cannot initialize video mode" );

}

n = _registerfonts( "*.fon" );

sprintf( fon_buff, "n%d", 1 );

_getvideoconfig (&vc);

maxx=vc.numxpixels;

_setfillmask(f_mask);

mouse (0,&m_x,&m_y,&m_k);

}

void outmenu (void) {

mouse (2,&m_x,&m_y,&m_k);

mouse (1,&m_x,&m_y,&m_k);

clrbuff();

_clearscreen(_GCLEARSCREEN);

_setcolor(9);

_floodfill(20,20,1);

int count=fileop("zastavka.prg",massiv);

picture (count,massiv,0);

_setcolor(0);

_rectangle(_GFILLINTERIOR,130,55,530,245);

_setcolor(7);

_rectangle(_GFILLINTERIOR,120,50,520,240);

_setcolor(0);

_setcharsize(16,16);

_setfont( fon_buff );

_setcharsize(50,40);

for (int i=1;i<3;i++){

_grtext(170+i,50," Êîíòðîëü");

_grtext(140+i,115," Îáó÷åíèå ");

_grtext(180+i,182," Âûõîä ") ;

}

_setfont( fon_buff );

_setcharsize(8,9);

_grtext(420,340,"CopyRigth by Andy (C) 1996");

_setcharsize(50,40);

_setfont( fon_buff );

}

int picture (int count, char massiv[], int index){

int i=index;

while (i

switch(massiv[i]){

case 'C':{

i=msv_tmp(i,massiv);

sscanf(temp,"%f,%f,%f,%d",&x,&y,&radius,&color);

_setcolor(color);

float r_ratio=ratio;

double asp_radius=sqrt(radius*radius+radius*radius);

calcxy();

if (radius==12) r_ratio=int (ratio);

if (radius==40) r_ratio=1.0259;

radius=radius/r_ratio;

_ellipse(_GBORDER,x-radius,y-radius/1.4,x+radius,y+radius/1.4);

break;

}

case 'L': {

i=msv_tmp(i,massiv);

sscanf (temp," %f, %f, %f, %f, d,%s",&x,&y,&x1,&y_1,&color,&command);

calcxy();

_setcolor(color);

switch(command){

case 'B': {

_rectangle(_GBORDER,x,y,x1,y_1);

break;

}

case 'F': {

_rectangle(_GFILLINTERIOR,x,y,x1,y_1);

break;

}

case 'L': {

_moveto(x1,y_1);

_lineto(x,y);

break;

}

}

break;

}

case 'M': return (i);

case 'F': {

int count1=fileop("exit.bil",massiv);

picture(count1,massiv,0);

return(0);

}

case 'P': {

char cmd='p';

if (massiv[i+1]=='L'){i=i+1;cmd='l';}

i=msv_tmp(i,massiv);

if (cmd=='p') {

sscanf(temp,"%f,%f,%d,%d",&x,&y,&color,&color1);

calcxy();

_setcolor(color);

_floodfill(x,y,color1);

break;

}

else {

sscanf(temp,"%f,%f,%f,%f,%d",&x,&y,&x1,&y_1,&color);

calcxy();

_setcolor(color);

_moveto(x1,y_1);

_lineto(x,y);

_moveto(x1,y_1);

i=i++;

while (!(int(massiv[i])=='P') && i

i=i-2;

i=msv_tmp(i,massiv);

sscanf (temp,"%f,%f",&x,&y);

calcxy();

_lineto(x,y);

i=i++;

}

i=i+2;

break;

}

}

case 'T': {

i=i+2;

int schet=0,len=0,q=0;

char txtmassiv[80];

while (!(schet ==3) && i

if (int(massiv[i]==',')) schet=schet++;

temp[q]=massiv[i];i++;q++;

}

sscanf(temp,"%f,%f,%d",&x,&y,&color);

while (!(int (massiv[i])==',')) {

txtmassiv[len]=massiv[i];i++;len++;

}

txtmassiv[len]=0;

_setcharsize(16,16);

color1=_getpixel(x+1,y+1);

_setcolor (color|color1);

_moveto(x+xs,y+ys);

_outtext(txtmassiv);

break;

}

case 'V': {

i=msv_tmp(i,massiv);

int count1=fileop(temp,massiv1);

i=i--;

i=msv_tmp(i,massiv);

sscanf(temp,"%f,%f,%f",&xs,&ys,&asp);

aspxs=(asp-xs);

if ((aspxs)==0) {

goodbye();

cout<<" íå äîïóñòèìîå äåëåíèå íà íîëü"<

exit(1);

}

ratio=(maxx+0)/(aspxs);

if ((aspxs)>320 && (aspxs)<400) ratio=(639-2)/(aspxs);

if ((aspxs)>270 && (aspxs)<280) ratio=(639-3)/(aspxs);

if ((aspxs)>210 && (aspxs)<260) ratio=(639+2.5)/(aspxs);

if ((aspxs)>280 && (aspxs)<300) ratio=(639+4)/(aspxs);

if ((aspxs)>400 && (aspxs)<411) ratio=(639-3)/(aspxs);

if ((aspxs)>480) ratio=(639)/(aspxs);

if ((aspxs)>420 && (aspxs)<430) ratio=(639+2)/(aspxs);

if ((aspxs)>260 && (aspxs)<270) ratio=(639-2)/(asp-xs);

if ((aspxs)<150 && (aspxs)>140) ratio=4.1;

if ((aspxs)<110 && (aspxs)>100){

ratio=4.1;

xs=xs-3;

ys=ys-6;

}

if ((aspxs)>100 && (aspxs)<120){

ratio=4.0;

xs=xs-17;

ys=ys-10;

}

if ((aspxs)>121 && (aspxs)<130){

ratio=5.3;

xs=xs+3;

ys=ys+6;

}

if ((aspxs)<160 && (aspxs)>150) ratio=4.11;

if ((aspxs)==160) {

ratio=4.11;

xs=xs+3;

ys=ys+2;

}

if ((aspxs)>170 && (aspxs)<180){

ratio=(639-40)/(aspxs);

xs=xs-5;

ys=ys-3;

}

if ((aspxs)>161 && (aspxs)<170){

ratio=(639-40)/(aspxs);

xs=xs-4;

ys=ys+5;

}

if ((aspxs)<200 && (aspxs)>190) ratio=3.2950;

if ((aspxs)<100 && (aspxs)>95) {

ratio=5.7;

ys=ys-3;

xs=xs-4;

}

if ((aspxs)<95 && (aspxs)>50) {

ratio=5.9;

ys=ys-3;

xs=xs-6;

}

if ((aspxs)<-215 && (aspxs)>-250){

ratio=2.909;

ys=ys-90;

xs=xs-162;

}

if ((aspxs)<-230 && (aspxs)>-290){

ratio=2.2;

ys=ys-93;

xs=xs-163;

}

if ((aspxs)>300 && (aspxs)<310) ratio=2.0999;

if ((aspxs)==165) {

ratio=3.9;

xs=xs+4;

ys=ys-4;

}

if ((aspxs)==166) {

ratio=3.6;

xs=xs-4;

ys=ys-8;

}

if ((aspxs)==306) ratio=2.0915;

if ((aspxs)==130) {

ratio=4.7;

xs=xs-2;

ys=ys-0;

}

if ((aspxs)==441) ratio=(639+2)/(asp-xs) if ((aspxs)==145) ratio=4.3;

if ((aspxs)==77) {

ratio=7.0;

xs=xs++;

ys=ys++;

}

picture(count1,massiv1,0);

xs=0;ys=0;ratio=1.000;

break;

}

case 'W': {

i=msv_tmp(i,massiv);

int count1=fileop(temp,massiv1);

i=i--;

i=msv_tmp(i,massiv);

sscanf(temp,"%f,%f",&xs,&ys);

picture(count1,massiv1,0);

xs=0;ys=0;ratio=1.000;

break;

}

}

i++;

}

return (0);

}

void outcursormenu(int punkt) {

_setfont( fon_buff );

_setcharsize(50,40);

switch (punkt){

case 1:_setcolor (15);

_grtext(170,50,"Êîíòðîëü");

_setcolor (8);

_grtext(140,115,"Îáó÷åíèå");

_grtext(180,182," Âûõîä");

break;

case 2:_setcolor (8);

_grtext(170,50,"Êîíòðîëü");

_setcolor (15);

_grtext(140,115,"Îáó÷åíèå");

_setcolor (8);

_grtext(180,182," Âûõîä ");

break;

case 3:_setcolor (8);

_grtext(170,50,"Êîíòðîëü");

_grtext(140,115,"Îáó÷åíèå");

_setcolor (15);

_grtext(180,182," Âûõîä");

break;

}

}

int choisebil(void){

draw_win (270,285,"Âûáåðè áèëåò");

int bilnum=1;

while(1){

if (bilnum>88) bilnum=88;

if (bilnum<1) bilnum=1;

_settextposition(row,40);

cout<

if (bilnum<10) {

_settextposition(row,40);

cout<

}

key=getch();

if (key==UP) bilnum++;

if (key==PGDW) bilnum=bilnum-10;

if (key==PGUP) bilnum=bilnum+10;

if (key==DOWN) bilnum--;

if (key==ENTER) break;

}

return(bilnum);

}

int choiserandombil(void) {

int bilnum=1,count_key=0,flag=0;

draw_win(270,285,"Âûáåðåì áèëåò");

while (1) {

bilnum++;

if (bilnum>88) bilnum=1;

_settextposition(row,40);

cout<

mouse (3,&m_x,&m_y,&m_k);

if (m_k==0 && flag==0) {count_key++;flag=1;}

if (m_k==1 && flag==1) {count_key++;flag=0;}

if (count_key>2) break;

if (kbhit()) {

if (!(getch()))getch();

break;

}

}

any_key();

return(bilnum);

}

void choise_cont_educ(char file[]) {

struct dostime_t time;

_dos_gettime(&time);

int count=fileop(file,massiv);

int i=0,quest_num=30,minute=time.minute,time_out=0,mark=0;

if (minute>45 && minute<50) {

time.minute=44;

_dos_settime(&time);

minute=44;

}

if (minute>49 && minute<59) {

time.minute=0;

_dos_settime(&time);

minute=0;

}

if (mode=='c') inputfio();

_clearscreen(_GCLEARSCREEN);

do {

i=i++;

i=picture(count,massiv,i);

mouse (4,&m_x,&m_y,&m_k);

mouse (1,&m_x,&m_y,&m_k);

if (i==0) break;

if (mode=='e') {

education(i,quest_num);

}

if (mode=='c') {

mark=control(i,quest_num,mark,minute,&time_out);

if (time_out==1) {

timeout();break;

}

}

quest_num=quest_num+50;

} while (i>0);

outresult(mark,mode);

}

int control(int index ,int quest_num,int mark,int minute,int *timeout) {

int count=index,count1,color,*tm_out=timeout,flag=1,position=1;

int count_key=0;

int flag_m=0;

struct dostime_t time1;

count=msv_tmp(count,massiv);

sscanf(temp,"%d",&count1);

clrbuff();

color=outcursor (position,count1,count);

while(flag>0) {

_dos_gettime(&time1);

_setcolor (32);

_settextposition(row,69);

printf("%02d:%02d:%02d",time1.hour,time1.minute,time1.second);

if ((time1.minute-minute)==15) { *tm_out=1;return (1);}

mousecmp (&position,count1,count,&flag,&count_key,&flag_m);

if (kbhit()){

key=getch();

if (key==UP) position--;

if (key==DOWN) position++;

if (key==SPACE || key==ENTER) flag=0;

clrbuff();

if (position>count1) position=count1;

if (position<1) position=1;

mouse (2,&m_x,&m_y,&m_k);

color=outcursor (position,count1,count);

mouse (1,&m_x,&m_y,&m_k);

}

}

color=outcursor (position,count1,count);

_setcolor(4);

if (color==1) {

_setcolor(2);

mark++;

}

_floodfill(quest_num,320,0);

return(mark);

}

void education(int index, int quest_num){

int count=index,count1;

count=msv_tmp(count,massiv);

sscanf(temp,"%d",&count1);

for (int i=0;i

count--;

count=msv_tmp(count,massiv);

sscanf(temp,"%f,%f,%f,%f,%d",&x,&y,&x1,&y_1,&color);

if (color==1) {

_setcolor(13);

_moveto(x,y_1);

_lineto(x,y);

_moveto(x1,y_1);

_lineto(x,y_1);

_moveto(x1,y_1);

_lineto(x1,y);

_moveto(x1,y);

_lineto(x,y);

mouse (2,&m_x,&m_y,&m_k);

any_key();

_setcolor(2);

_floodfill(quest_num,320,0);

break;

}

}

}

void outresult(int mark,char mode) {

mouse (2,&m_x,&m_y,&m_k);

_setcolor(15);

_rectangle(_GFILLINTERIOR,543,303,613,320);

if (mode=='e') mark=10;

_setcolor(2);

if (mark<9 && mode=='c') {

_setcolor (2);

_grtext(546,301," Ýêçàìåí");

_grtext(552,315,"íå ñäàí");

}

else if (mode=='c') {

_setcolor (4);

_grtext(546,301," Ýêçàìåí");

_grtext(554,315," ñäàí ");

}

if ( mode=='e') {

_setcolor (14);

_grtext(546,301," Íàæìèòå");

_grtext(548,315," ïðîáåë");

}

_floodfill(600,250,0);

if (mode=='c') savefio(mark);

any_key();

}

void getout(void ){

mouse (2,&m_x,&m_y,&m_k);

_getimage (255,280,380,335,buff_image);

_setcolor(0);

_rectangle(_GFILLINTERIOR,260,285,380,335);

_setcolor(7);

_rectangle(_GFILLINTERIOR,255,280,375,330);

_setcolor (0);

_setcharsize(16,16);

_setfont( fon_buff );

_setcharsize(16,8);

_grtext(270,285,"Âû óâåðåíû");

_grtext(270,310," (Y/N) ");

while(1){

key=getch();

if (key=='y' || key=='Y') {

goodbye();

cout<<"Good bye !!!";

exit(0);

}

if (key=='n' || key=='N') break;

}

_putimage(255,280,buff_image,_GPSET);

_setcharsize(8,9);

_setfont( fon_buff );

mouse (4,&m_x,&m_y,&m_k);

mouse (1,&m_x,&m_y,&m_k);

}

void any_key(void) {

int count_key=0,flag=0;

while (1) {

mouse (3,&m_x,&m_y,&m_k);

if (m_k==0 && flag==0) {count_key++;flag=1;}

if (m_k==1 && flag==1) {count_key++;flag=0;}

if (count_key>2) break;

if (kbhit()){

key=getch();

if (!key) getch();

break;

}

}

}

void calcxy(void) {

x = (x/ratio+xs);

y = (y/ratio+ys);

y_1= (y_1/ratio+ys);

x1 = (x1/ratio+xs);

}

void clrbuff(void) {

#pragma aux clrbuff =

" push ds"

" push ax"

" xor ax,ax"

" mov ds,ax"

" mov ax,ds:[0x41a]"

" mov ds:[0x41c],ax"

" pop ax"

" pop ds";

}

void draw_win(int x,int y,char msg[]) {

_setcolor(0);

_rectangle(_GFILLINTERIOR,240,285,415,335);

_setcolor(7);

_rectangle(_GFILLINTERIOR,235,280,410,330);

_setcolor (0);

_setcharsize(16,16);

_setfont( fon_buff );

_moveto(x,y);

_outgtext(msg);

_setcolor(15);

_rectangle(_GFILLINTERIOR,245,303,395,324);

_settextposition(row,32);

_setcolor (16);

cout<<" ";

}

int fileop (char file[],char massiv[] ) {

char sym;int count=0;ifstream f1 (&file[0]);

if (!f1) {

goodbye();

cout<<"Íå ìîãó îêòðûòü ôàéë-";

for (int i=0;i<12;i++) cout<

cout<

}

while(f1.get(sym)){massiv[count]=sym;count=count+1;}

return (count);

}

void goodbye(void) {

union REGPACK regs;

_setvideomode( _DEFAULTMODE );

regs.w.ax=0x0305;

regs.w.bx=0x0201;

intr ( 0x16,®s);

}

void inp_data(unsigned char data[]) {

for (int i=0;i<20;i++) data[i]=' ';

_settextposition(row,32);

int count=0,key;

while (1) {

m01: key=getch();

if (!key) {getch();goto m01;}

if (key==ENTER) break;

if (key==8) {

count--;data[count]=' ';

count--;goto m02;

}

if (key<32) goto m01;

data[count]=key;

m02: _settextposition(row,32);

for (int i=0;i<18;i++){cout<

count++;

if (count>17|| count<0) {

count=0;

for (i=0;i<20;i++){data[i]=' ';}

}

}

for (i=count;i<18;i++) data[i]='_';

}

void inputfio(void) {

draw_win(256,285,"Ââåäèòå Âàøå èìÿ");

inp_data(name);

draw_win(246,285,"Ââåäèòå Âàøó ôàìèëèþ");

inp_data(subname);

}

void mouse (int on_off_xy, int *m_x,int *m_y,int *m_k) {

union REGPACK regs;

int mx,my,mk;

int mouse_on_off=on_off_xy;

if (mouse_on_off==0 )

{

regs.w.ax=0;

intr (0x33,®s);

}

if (mouse_on_off==1 )

{

regs.w.ax=1;

intr (0x33,®s);

}

if (mouse_on_off==2 )

{

regs.w.ax=2;

intr (0x33,®s);

}

if (mouse_on_off==4 )

{

regs.w.dx=1;

regs.w.cx=1;

regs.w.ax=4;

intr (0x33,®s);

}

if (mouse_on_off==3 )

{

regs.w.ax=3;

intr (0x33,®s);

mx=regs.w.cx;

my=regs.w.dx;

mk=regs.w.bx;

*m_x=mx;

*m_y=my;

*m_k=mk;

}

}

int menu() {

int key,punkt=1;m_k=0;

outcursormenu (punkt);

mouse (4,&m_x,&m_y,&m_k);

mouse (1,&m_x,&m_y,&m_k);

while (1) {

mouse (3,&m_x,&m_y,&m_k);

if (m_k==1) {

if (m_x>190 && m_y>60 && m_x<450 && m_y<100)

{punkt=1;break;}

if (m_x>180 && m_y>120 && m_x<450 && m_y<170)

{punkt=2;break;}

if (m_x>210 && m_y>190 && m_x<390 && m_y<230)

{punkt=3;break;}

}

if (kbhit()) {

if (punkt==0) punkt=1;

if (punkt==4) punkt=3;

key=getch();

if (key==UP) punkt--;

if (key==DOWN) punkt++;

if (key==ENTER || key==SPACE) reak;

if (key==ESC) getout();

outcursormenu (punkt);

}

}

mouse (2,&m_x,&m_y,&m_k);

outcursormenu (punkt);

return(punkt);

}

void mousecmp(int *position,int c1,int c,int*flag,int *count_key,int *flag_m) {

int count=c;

mouse (3,&m_x,&m_y,&m_k);

if (m_k==0 && *flag_m==0) {*count_key=*count_key+1;*flag_m=1;}

if (m_k==1 && *flag_m==1) { *count_key=*count_key+1;*flag_m=0;}

if (*count_key>1) {

for (int i=1;i

count--;

count=msv_tmp(count,massiv);

sscanf(temp,"%f,%f,%f,%f,%d",&x,&y,&x1,&y_1,&color);

if (m_x>x && m_y>y && m_x

*position=i;

*flag=0;

mouse (2,&m_x,&m_y,&m_k);

}

else *count_key=0;

}

}

}

int msv_tmp(int count,char massiv[]) {

int q=0,i=count+2;

for(int z=0;z<100;z++) temp[z]=0;

while (!(massiv[i]==10)) {

temp[q]=massiv[i];

i++;

q++;

}

temp[q]=0;

return(i);

}

void timeout () {

mouse (2,&m_x,&m_y,&m_k);

ratio=1.0,xs=0,ys=0,y_1=0,y=0,x=0,x1=0,aspxs=1;

int count=fileop("exit.bil",massiv);

picture(count,massiv,0);

}

void savefio (int mark ) {

int i=0,u=0;

char massmark[2];

_settextposition(1,1);

while (name[i] !=13 && i<19) {

massiv2[i]=name[i];

i++;

}

massiv2[i]=13;

i++;

while (subname[u] !=13 && u<19) {

massiv2[i]=subname[u];

u++;

i++;

}

massiv2[i]=13;

i++;

sprintf( massmark,"%d",mark);

massiv2[i]=massmark[0];

i++;

massiv2[i]=13;

ofstream f1 ("data.rec");

if (!f1) {

goodbye();

cout<<"Íå ìîãó îòêðûòü ôàéë-";

cout<<"data.rec"<

exit (1);

}

i=0;

while(massiv2[i]){

f1.put(massiv2[i]);

i++;

}

}

}


3

3.1

IBM PC Intel 386. VGA 640X480 c 256 . . . MS-DOS 5.0 .

486 . 2 . .

3.2

install.exe. . F1 .

, pdd.exe Enter.

data.rec. , .

:

- , keyrus.com .


4

4.1

. .

- " ", (- 20 5 , - 40 10 ). - ( ).

- . ( - ). , - .

- " ": ( - ). ( ), .

.

, . . . :

- ;

- - ;

- - .

, . , - - . - , .

.

, .

:

- ;

- 50 . :

501.5-50=25 .

, , ( ). :

- ;

- ;

- ;

- ;

- ;

- .

- 110 . : 68 1 . 25 :

100251.6812=50400 -

. 3 . 2

(, , ..). . , . , , 60 . 25 :

12*(3+2)+12*60=780 .

1996 150 . 25 :

150*780=117000 .

, . 1996 0.2 :

0.278012=1872 -

. :

1 10

1 100

1 20

1 15 100

:

(10+100)*12+(100+20)*12=2760 .

- , , , ..)- 1 . :

1*25*12=300 .

. 22 - 35 2 . . - 30 -. 200 . 25 :

200*30*25= 150000 .

25 :

150000+2760+117000@ 269760 .

:

50400+1872+300@ 52572 .

156000
. ( 10 30 500 =150000 , 20 =6000 . ). , . :

(269760+52572)-156000@ 166332

.


.


5

5.1.

5.1.1. () - (), . :

5.1.1.1. ;

5.1.1.2. ;

5.1.1.3. .

5.1.2. - , (). () .

, , . :

5.1.2.1. ;

5.1.2.2. , ;

5.1.2.3. ;

5.1.2.4. ;

5.1.2.5. , ;

5.1.2.6. ;

5.1.2.7. .

5.1.3. , .

:

5.1.3.1. ;

5.1.3.2. , , , , ;

5.1.3.3. ;

5.1.3.4. ;

5.1.3.5. ;

5.1.3.6. .

5.1.4. , . 60-70 ., 30 .

5.1.5. , .

5.1.6. :

5.1.6.1. , ;

5.1.6.2. . .

5.1.6.3. , ;

5.1.6.4. ;

5.1.6.5. .

5.1.7. :

5.1.7.1. ( .), ;

5.1.7.2. ܻ;

5.1.7.3. .

. , . ,

 

 

 

! , , , .
. , :