走樓梯

#include <stdio.h>
int main()
{
    int x=1,find=0;
    while(!find)
    {
        x++;
        if(x%2==1&&x%3==2&&x%5==4&&x%6==5&&x%7==0)
        {
            printf("x=%d\n",x);
            find=1;
        }
    }
    return 0;
}

注意:
1.賦值與恆等於的區別;
2.看不懂,沒印象的即使百度查詢,!find相當於find==0。

發佈了31 篇原創文章 · 獲贊 3 · 訪問量 7695
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章