为什么是死循环??
#include<stdio.h>
main()
{
int x=0,y=0;
char i='y',j='\0';
printf("hello world!\n");
while(i=='y')
{
printf("enter x and y\nx=");
scanf("%d",&x);
printf("y=");
scanf("%d",&y);
if (x==y)
printf("x=y, no maximum.\n");
else if (x>y)
printf("x>y, x is the maximum.\n");
else
printf("x<y, y is the maximum.\n");
printf("enter 'y' or 'Y' to continue.\nand press others to quiet...\nyour choose is...");
scanf("%c",&j);
if (j=='y')
i='\0';
printf("\n*************************\n");
}
}
为什么是死循环??
scanf("%c",&j);
怎么没有执行到??
求解。