UkrReferat.com

: 75843
: 2016-12-04
7 10



$

'

 

:   

, , :

,
,
Word Doc
2342
219

#include

#include

#include

#include

#include

#include

#define CLIP_ON 1

#define FON_2 CYAN

#define FON_1 7

#define COL_1 60

#define COL_2 57

#define COL_3 58

void Titul (void);

void GRAF(float E, float C, float r1,float r2);

void SHEMA(void);

int main(void)

{

clrscr();

Titul ();

clrscr();

int gdriver = DETECT, gmode, errorcode;

initgraph(&gdriver, &gmode, "c:\\bcpp\\bgi");

errorcode = graphresult();

if (errorcode != grOk)

{

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

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

getch();

exit(1);

}

///------------------------------

float E;

float t;

float C;

float r1;

float r2;

E=100;

C=1e-03;

r1=3000;

r2=1000;

SHEMA(); GRAF(E, C, r1,r2);

//....................................

char ch;

while(ch!=27)

{

restorecrtmode();

clrscr(); //

//textbackground(YELLOW);

textcolor(57);

printf("\n\n\n\n\n\n\n\n");

cprintf(" ͻ"); printf("\n");

cprintf(" 室 ணࠬ i: 'e' "); printf("\n");

cprintf(" "); printf("\n");

cprintf(" த ணࠬ ﬨ "); printf("\n");

cprintf(" ࠬi 奬, i: 'n' "); printf("\n");

cprintf(" ͼ"); printf("\n");

ch=getch();

switch(ch)

{

case 'e': exit(1); break;

case 'n':

clrscr(); textcolor(GREEN);

cprintf(" Ŀ"); printf("\n");

cprintf(" iࠦ i i, 鮡: "); printf("\n");

cprintf(" Ĵ"); printf("\n");

cprintf(" E<=100 B "); printf("\n");

cprintf(" C=(0,5..3) "); printf("\n");

cprintf(" r1=(500..3000) "); printf("\n");

cprintf(" r2=(500..3000) "); printf("\n");

cprintf(" "); printf("\n");

textcolor(WHITE);

cprintf("\n\ni i E (B) = ");

scanf("%f",&E);

cprintf("\ni i C () = ");

scanf("%f",&C);

cprintf("\ni i r1 () = ");

scanf("%f",&r1);

cprintf("\ni i r2 () = ");

scanf("%f",&r2);

setgraphmode(getgraphmode());

SHEMA(); GRAF(E, C*pow10(-3), r1,r2); break;

default: { clrscr(); //textbackground(7);

textcolor(RED+BLINK); printf("\n\n\n\n\n\n\n\n\n\n\t\t");

cprintf(" i ᪠");

delay(4000);textcolor(WHITE);restorecrtmode();clrscr(); }

-----> Page:

0 [1] [2] [3]

ò