急 大家帮帮忙!有答案今天就结帖!该怎么解决

急急 大家帮帮忙!!!有答案今天就结帖!!
在图形模式下,绘制一元二次函数ax2+bx+c。其中系数a,b,c,以及x的取值范围,均由用户从键盘输入。
用户界面中的菜单包括“输入系数”、“输入x的区间”、“开始绘制”、“退出”4项。

------解决方案--------------------
给你写个画图函数吧,你写个相应系统的画点函数就可以了。
void draw_yours(int32_t a, int32_t b, int32_t c, int32_t x1, int32_t x2, color_t color, draw_dot_func func)
{
int32_t x;
point_t p;
for(x=x1; x <x2; x++)
{
p.x = x;
p.y = a*x*x + b*x + c;
func( p, color);
}
}

------解决方案--------------------
本程序在TC+XP下调试通过编译
你使用是要把initgraph()中的d:\\tc改成你自己TC的路径
#include <stdio.h>
#include <graphics.h>
int Draw(float a,float b,float c,float x1,float x2);
int main()
{
char s[80];
int m;
float a,b,c,x1,x2;
do
{
clrscr();
printf( "\n\n\n1.Input a,b,c\n ");
printf( "2.Input x1,x2\n ");
printf( "3.Begin draw\n ");
printf( "4.quit\n ");
do
{
printf( "input your choice: ");
gets(s);
m=atoi(s);
}while(m <0||m> 4);
switch(m)
{
case 1:
scanf( "%f,%f,%f ",&a,&b,&c);
break;
case 2:
scanf( "%f,%f ",&x1,&x2);
break;
case 3:
Draw(a,b,c,x1,x2);
break;
case 4:
exit(0);
}
}while(1);

}

int Draw(float a,float b,float c,float x1,float x2)
{
int driver=DETECT,mode;
float i,y;
initgraph(&driver,&mode, "d:\\tc ");
line(0,getmaxy()/2,getmaxx(),getmaxy()/2);
line(getmaxx()/2,0,getmaxx()/2,getmaxy());
for(i=x1;i <=x2;i+=0.1)
{
y=a*i*i+b*i+c;
putpixel((int)i+getmaxx()/2,(int)y+getmaxy()/2,2);
}
getch();
closegraph();

}