请问我的C程序为什么不能循环运行
RT,编译之后只能运行一次,到了应该输入y或者n的时候程序就自动退出了!跪求解答!#include <stdio.h>
#include <stdlib.h>
int main(void)
{
char another_game='y';
printf("Hay man!If you wanna try this,press ENTER!\n");
scanf("%c",&another_game);
while(another_game=='y');
{
int num1=0,num2=0;
num1=1+rand()%10;
printf("Look,all you need to do is type a number from 1~10,and press ENTER.Quite simple,uh?Good luck!\n");
scanf("%d",&num2);
if(num2==num1)
printf("You are doing so well!\n");
else
printf("Well,maybe you will be lucky next time\n");
printf("Another round?y/n");
scanf("%c",&another_game);
}
return 0;
}