int main(){

	char colourNames[][14] = { , , , , , , , , ,
              , , , , , ,  };

	int stroke=0,fill=0,back=0,i;

	double centerX = 300,centerY = 300,coreSide,armLength,pentaLength;

	printf();
	scanf(,&coreSide);

	printf();
	scanf(,&armLength);

	printf();

	for(i=0;i<16;i++){
		printf(,i+1,colourNames[i]);
		if((i+1) % 3 == 0){
			printf();
		}
	}

	while(stroke==fill && fill==back){
		printf();
		scanf(,&stroke,&fill,&back);
	}

	pentaLength = coreSide/(2 * tan(pi/5)) + sqrt(armLength*armLength - coreSide*coreSide/4);

	initwindow(2*centerX,2*centerY,);

	setcolor(stroke-1);

	setfillstyle(SOLID_FILL,back-1);

	bar(0,0,2*centerX,2*centerY);

	floodfill(centerX,centerY,back-1);

	setfillstyle(SOLID_FILL,fill-1);

	for(i=0;i<5;i++){
		line(centerX + coreSide*cos(i*2*pi/5)/(2*sin(pi/5)),centerY + coreSide*sin(i*2*pi/5)/(2*sin(pi/5)),centerX + coreSide*cos((i+1)*2*pi/5)/(2*sin(pi/5)),centerY + coreSide*sin((i+1)*2*pi/5)/(2*sin(pi/5)));
		line(centerX + coreSide*cos(i*2*pi/5)/(2*sin(pi/5)),centerY + coreSide*sin(i*2*pi/5)/(2*sin(pi/5)),centerX + pentaLength*cos(i*2*pi/5 + pi/5),centerY + pentaLength*sin(i*2*pi/5 + pi/5));
		line(centerX + coreSide*cos((i+1)*2*pi/5)/(2*sin(pi/5)),centerY + coreSide*sin((i+1)*2*pi/5)/(2*sin(pi/5)),centerX + pentaLength*cos(i*2*pi/5 + pi/5),centerY + pentaLength*sin(i*2*pi/5 + pi/5));

		floodfill(centerX + coreSide*cos(i*2*pi/5 + pi/10)/(2*sin(pi/5)),centerY + coreSide*sin(i*2*pi/5 + pi/10)/(2*sin(pi/5)),stroke-1);
	}

	floodfill(centerX,centerY,stroke-1);

	getch();

	closegraph();
}