原先做的东西 出现“'__****'在模块” 语法错误
#include
main()
{
float x,y;
printf("Input the coordinate of a point\n");
printf("x=");
scanf("%f",&x);
printf("y=");
scanf("%f",&y);
if(x==0)
if(y>0)
printf("The point is at the Y zhengbanzou");
else
if(y==0)
printf("The point is at the yuandian");
else
printf("The point is at the Y fubanzou");
else
if(x>0)
if(y>0)
printf("The point is in 1st quadrant.\n");
else
if(y==0)
printf("The point is at the X zhengbanzou");
else
printf("The point is in 4st quadrant.\n");
else
if(y>0)
printf("The point is in 2st quadrant.\n");
else
if(y==0)
printf("The point is at the X zhengbanzou");
else
printf("The point is in 3st quadrant.\n");
getch();
}
改了之后
#include
main()
{
float x,y;
printf("Input the coordinate of a point.\n");
printf("x=");
scanf("%f",&x);
printf("y=");
scanf("%f",&y);
if(x==0)
{if(y>0)
printf("The point is at the Y zhengbanzou.\n");
else
{if(y==0)
printf("The point is at the yuandian.\n");
else
printf("The point is at the Y fubanzou.\n");}}
else
if(x>0)
{if(y>0)
printf("The point is in 1st quadrant.\n");
else
if(y==0)
printf("The point is at the X zhengbanzou.\n");
else
printf("The point is in 4st quadrant.\n");}
else
{if(y>0)
printf("The point is in 2st quadrant.\n");
else
{if(y==0)
printf("The point is at the X fubanzou.\n");
else
printf("The point is in 3st quadrant.\n");}}
getch();
}