Контрольная работа: Программирование на языке С++
}
case 7181: switch(ki)
{
case 1: spawnl(P_WAIT, "1.EXE", NULL); break;
case 2: spawnl(P_WAIT, "2.EXE", NULL); break;
case 3: spawnl(P_WAIT, "3.EXE", NULL); break;
case 4: spawnl(P_WAIT, "4.EXE", NULL); break;
case 5: spawnl(P_WAIT, "5.EXE", NULL); break;
case 6: spawnl(P_WAIT, "6.EXE", NULL); break;
case 7: spawnl(P_WAIT, "CPP.EXE", NULL); break;
case 8: goto snachala;
case 9: closegraph(); exit(1);
}
}
goto sled;
}
CPP.CPP
#include<graphics.h>
#include<math.h>
#include<iostream.h>
#include<stdlib.h>
#include<stdio.h>
#include<conio.h>
int sravnenie(long x1,long x2,long y1,long y2,long r1,long r2)
{int d;
d=int(sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)));
if (d>(r1+r2)) return 1; else return 0;} //1-ne peresekajutsja 0-peresikajutsja