#include〈graphics.h〉 在TC下怎么运行不了啊?请各位高手帮忙啊
#include<graphics,h>main(){intgraphdriver=DETECT;intgraphmode,i,y,x;initgraph(&graphd...
#include<graphics,h>
main()
{
int graphdriver=DETECT;
int graphmode,i,y,x;
initgraph(&graphdriver,&graphmode,"");
bar(40,40,450,450);
for(y=50;y<450;y=y+20)
{
line(50,y,430,y);
}
x=50;
while(x<=430)
{line(x,50,x,430);
x=x+20;
}
setcolor(BLACK);
setfillstyle(1,BLACK);
do
{pieslice(x,y,0,360,10);
x=50;y=50;
x=x+20,y=y+20;
}
while(x<450,y<450);
} 展开
main()
{
int graphdriver=DETECT;
int graphmode,i,y,x;
initgraph(&graphdriver,&graphmode,"");
bar(40,40,450,450);
for(y=50;y<450;y=y+20)
{
line(50,y,430,y);
}
x=50;
while(x<=430)
{line(x,50,x,430);
x=x+20;
}
setcolor(BLACK);
setfillstyle(1,BLACK);
do
{pieslice(x,y,0,360,10);
x=50;y=50;
x=x+20,y=y+20;
}
while(x<450,y<450);
} 展开
2个回答
展开全部
#include<graphics,h>
应该改成#include <graphics.h>
#include<graphics.h>
int main()
{
int graphdriver=DETECT;
int graphmode,i,y,x;
initgraph(&graphdriver,&graphmode,"");
bar(40,40,450,450);
for(y=50;y<450;y=y+20)
{
line(50,y,430,y);
}
x=50;
while(x<=430)
{line(x,50,x,430);
x=x+20;
}
setcolor(BLACK);
setfillstyle(1,BLACK);
do
{pieslice(x,y,0,360,10);
x=50;y=50;
x=x+20,y=y+20;
}
while(x<450,y<450) ;
closegraph();
getch();
return 0;
}
应该改成#include <graphics.h>
#include<graphics.h>
int main()
{
int graphdriver=DETECT;
int graphmode,i,y,x;
initgraph(&graphdriver,&graphmode,"");
bar(40,40,450,450);
for(y=50;y<450;y=y+20)
{
line(50,y,430,y);
}
x=50;
while(x<=430)
{line(x,50,x,430);
x=x+20;
}
setcolor(BLACK);
setfillstyle(1,BLACK);
do
{pieslice(x,y,0,360,10);
x=50;y=50;
x=x+20,y=y+20;
}
while(x<450,y<450) ;
closegraph();
getch();
return 0;
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询