각각다른 랜덤함수주기._2
샤이
2023.04.01
각각다른 랜덤함수주기._2수다님이 말하신계 무슨뜻인지 잘 모르겠어요;;
while문에서 괄호안의 조건이 만족못하면 바로 나가는거 아닌가요??
근데 왜 if문에서 check가 0인데도 못나가고 계속 도는거죠??질문 내용 :
#includestdio.h
int main()
{
int x,y,z;
int a,b,c;
int check=1;
while(check==1);
{
srand((int)time(null));
x=rand()%10;
y=rand()%10;
z=rand()%10;
if(x==y || y==z || x==z)
check=1;
else
check=0;
}
printf(%d %d %d,x,y,z);
system(pause);
return 0;
}