Wrong Answer
代码
#include <stdio.h>
int main()
{
int x;
int y;
printf("enter x.");
scanf("%d",&x);
if(x!=0)
{
if(x>0)
y=1;
else
y=-1;
}
else
y=0;
printf("x=%d,y=%d\n",x,y);
return 0;
}
#include <stdio.h>
int main()
{
int x;
int y;
printf("enter x.");
scanf("%d",&x);
if(x!=0)
{
if(x>0)
y=1;
else
y=-1;
}
else
y=0;
printf("x=%d,y=%d\n",x,y);
return 0;
}