C语言画平行四边形
#include "stdio.h"
struct po
{
int x;
int y;
};
int main()
{
int i;
po p[4];
while (i=0;i<4;i++)
{
printf ("Please input %d x.",i);
scanf ("%d",&p[i].x);
printf ("Please input %d Y.",i);
scanf ("%d",&p[i].y);
if (p[0].x-p[1].x==p[3].x-p[2].x)
{
if (p[0].y-p[1].y==p[3].y-p[2].y)
printf ("The pingxingsibianxing cun zai!!!");
else
printf ("Cannot output pingxingsibianxing");
}
else
printf ("Cannot output pingxingsibianxing");
}
getchar ();
}
In function 'int main()':
[Error] expected ')' before ';' token
[Error] expected ';' before ')' token
[Error] expected '}' at end of input
运行时报错的。大侠们能帮小弟找出原因吗?谢谢了!