关于do....while的一个问题
# include <stdio.h>bool Isprime(int val)
{
int i;
for (i=2; i<val; ++i)
{
if (val%i == 0)
break;
}
if (val == i || val == 1)
return true;
else
return false;
}
int main(void)
{
int m;
char ch;
do
{
scanf("%d",&m);
if (Isprime(m))
printf("yes\n");
else
printf("no\n");
printf("继续请按Y,结束请按N\n");
scanf(" %c",&ch);
} while ("y" == ch||"Y" == ch);
return 0;
}
以上代码哪里出错....求教....