#include
#include
#include
#include
#include #include
void integ(void);
void music(int w)
{ int i;
for(i=1;i0)
{
ch=getch();
/*ia?aieuaiiiy*/
if(ch==27||(ch==13&&q==3)) goto m;
if(ch==13&&q==2)
{ Titul();
goto n;
}

if(ch==13&&q==1)
{ integ();
goto a; }

if(ch==72)
{
if (q==1) q=3;
else q=q-1;
}

else

{if(ch==77)
{
if (q==3) q=1;
else q=q+1; }
else
{if(ch==80)
{
if (q==3) q=1;
else q=q+1;}
else
{if(ch==75)
{
if (q==1) q=3;
else q=q-1;}}
} }
menu(q);
if (ch==49)
{ re=r;
if (re==1)
{
setfillstyle(1,8);
bar(190,450,420,470);
setcolor(15);
outtextxy(235,460,»press 1 music off»);r=2;}
if(re==2)
{
setfillstyle(1,8);
bar(190,450,420,470);
setcolor(15);
outtextxy(235,460,»press 1 music on»);r=1; }
}
if(re==2) music(2);
}
m:
closegraph();
}
float f(float x)
{ float y;
y=sqrt(exp(x)-x*x);
return(y);
}
void integ(){
float dx,p,l,a,b;
int i; uuu:
char k[20];
cleardevice();
setbkcolor(15);
setcolor(4);
settextstyle(1,0,3);
sprintf(k,»Pobunna wukonywatuc ymowa a<=b"); outtextxy(30,10,k); printf("\n\n\n\n\t\t\t\t Wedit a=",a); scanf("%f",&a); printf("\t\t\t\t Wedit b=",b); scanf("%f",&b); printf("\n"); if (a>=b)
{printf(«error»);
getch();
goto uuu;
}
else
dx=(b-a)/30;
p=0;
l=0;
for(i=a;i<30;i++) { p=p+f(i*dx)*dx; l=l+f((i+dx)*dx)*dx; } cleardevice(); setcolor(1); settextstyle(0,0,3); outtextxy(200,50,"Rezyltat"); settextstyle(3,0,2); setcolor(9); rectangle(150,100,500,300); setcolor(4); sprintf(k," \n\tprjamokyt=%.6f",p); outtextxy(140,180,k); sprintf(k,"\n\n \t parabul=%.6f",l); outtextxy(140,220,k); getch(); cleardevice(); fon();menu(1); }

Похожие записи