Контрольная работа: Программирование на языке С++
{char s,otv;
int dr=DETECT, mod, err;
int color[100],KOL,ist;
long x[100],y[100],r[100],l,i,f,k,j,n;
m1:
initgraph(&dr,&mod," ");
err=graphresult();
if(err) {
cout<<"error initgraph"<<grapherrormsg(err);
exit(1);
}
cout<<"Vvedite kol-vo okruzhnostei -> "; cin>>KOL;
randomize();
cleardevice();
for (i=0;i<KOL;i++)
{
x[i]=random(540)+50;
y[i]=random(320)+80;
r[i]=random(20)+30;
color[i]=random(13)+1;
}
for (i=0;i<KOL;i++)
{ setcolor(color[i]);
circle(x[i],y[i],r[i]); }
outtextxy(5,5,"Press '1' for vivoda okryzhnostei yedinenih");
outtextxy(5,15,"Press '2' for vivoda okryzhnostei sgrypirovanih po 3");
outtextxy(5,25,"Press 'q' for quit");
m: ist=0;
s=getch();