c语言 syntax error :missing ';' before 'type#include#includevoid main(){ /* int driver,mode;*/double x1,x2,x3,x,y1,y2,y3,y;double x11,x22,x33,y11,y22,y33;double q,w,e; /*driver=VGA; mode=VGAMED;initgraph(&driver,& mode,"");*/double a[3][3],b[3][3],

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/28 19:01:41
c语言syntaxerror:missing'';''before''type#include#includevoidmain(){/*intdriver,mode;*/doublex1,x2,x3,x,y

c语言 syntax error :missing ';' before 'type#include#includevoid main(){ /* int driver,mode;*/double x1,x2,x3,x,y1,y2,y3,y;double x11,x22,x33,y11,y22,y33;double q,w,e; /*driver=VGA; mode=VGAMED;initgraph(&driver,& mode,"");*/double a[3][3],b[3][3],
c语言 syntax error :missing ';' before 'type
#include
#include
void main()
{ /* int driver,mode;*/
double x1,x2,x3,x,y1,y2,y3,y;
double x11,x22,x33,y11,y22,y33;
double q,w,e;
/*driver=VGA; mode=VGAMED;
initgraph(&driver,& mode,"");*/
double a[3][3],b[3][3],c[3][3],d[3][3]={0},o[3][3]={0},f[3][3],g[3][3]={0};
int i,j,k;
w=cos (q);
e=sin (q);
printf("请输入第1个点的坐标,请用空格格开\n");
scanf("%f%f",&x1 ,&y1);
printf("请输入第2个点的坐标,请用空格格开\n");
scanf("%f%f",&x2,&y2);
printf("请输入第3个点的坐标,请用空格格开\n");
scanf("%f%f",&x3,&y3);
printf("请输入旋转点的坐标,请用空格格开\n");
scanf("%f%f",&x,&y);
printf("请输入旋转的角度,逆时针为正,顺时针为负,单位为弧度\n");
scanf("%f",&q);
float p[9]={1,0,0,0,1,0,-x,-y,1},///syntax error :missing ';' before 'type',这里报错,为啥啊
m[9]={w,e,0,-e,w,0,0,0,1},
n[9]={1,0,0,0,1,0,x,y,1},
b[9]={x1,y1,1,x2,y2,1,x3,y3,1},
v[9]={0};
明天调1下,调程序真无语

c语言 syntax error :missing ';' before 'type#include#includevoid main(){ /* int driver,mode;*/double x1,x2,x3,x,y1,y2,y3,y;double x11,x22,x33,y11,y22,y33;double q,w,e; /*driver=VGA; mode=VGAMED;initgraph(&driver,& mode,"");*/double a[3][3],b[3][3],
楼上说的没错.
因为你是静态申请数组,所以需要给指定的值,而不能用变量,你可以:
float p[9]={1,0,0,0,1,0,0,0,1};
p[6]=-x; p[7]=-y;
这样来达到你想要的效果.
希望对你有所帮助.