0

Stuck with it for hours. Haven't slept since... Well, can't really remember.
So can anyone help me out and point out what is wrong here?

program Taht;
        uses Crt,Graph;
        const
        Star1:array[1..18] of integer=
        (75,0,100,50,150,75,100,100,75,150,50,100,0,75,50,50,75,0);
        Star2:array[1..18] of integer=
	(200,150,225,175,200,200,175,225,150,200,125,175,150,150,175,125,200,150);
	var
		DriverVar:integer;
		ModeVar:integer;
	begin
		DriverVar:=Detect;
		InitGraph(DriverVar, ModeVar,'');
		SetFillStyle(1,Blue);
		FillPoly(9,Star1);
		SetFillStyle(8,Green);
		FillPoly(9,Star2);
		SetFillStyle(8,Green);
		SetColor(Red);
		Circle(300,250,50);
		Rectangle(250,200,400,200,450,300,250,300);
		Floodfill(1,1,15);
		SetColor(LightCyan);
		Ellipse(300,200,0,360,100,30);

		Readln;
		Delay(5000);
		CloseGraph
        end.
2
Contributors
3
Replies
5
Views
10 Years
Discussion Span
Last Post by Ancient Dragon
0

I have no clue either. What do you think is wrong? What is it supposed to do? As far as I know that is supposed to display all the letters of the Greek alphabet. You should always add comments in your code to explain what it is doing.

0

It's supposed to be two stars.
The problem is somewhere in

Star2:array[1..18] of integer=
	(200,150,225,175,200,200,175,225,150,200,125,175,150,150,175,125,200,150);
0

If it doesn't work the way you want it to, then just simply adjust the points until the lines are drawn correctly. Sometimes this will require trial-and-error method.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.