#include <stdio.h>
#include <stdlib.h>
int main()
{
int x=1,find=0;
while (!find)
{
if(x%2==1&&x%3==2&&x%5==4&&x%6==5&&x%7==0)
{
printf("x=%d\n",x);
find=1;
}
x++;
}
return 0;
}
總結:while的後面沒有“;”。 在c語言程序中“等於”的符號是“==”。“x++”的位置應如上述位置。