C程序运行时,显示出现了问题,导致程序停止正常工作,如果有可用的解决方案
#include"stdio.h"#include"stdlib.h"
#include"time.h"
main()
{
int a,b,i=1,shang,yu,t=0,w4=0,w5;
system("cls");
srand((int)time(0));
while(i<=10)
{a=rand()%10;
b=rand()%10;
if(a<b)
continue;
else
if(a%b!=0)
continue;
else
{printf("%d/%d=",a,b);
scanf("%d",&shang);
}
if(shang==a/b)
{ printf("回答正确!\n");
w4+=1;}
else
{ printf("回答错误!\n");
w5+=1;}
i=w4+w5;
}
}