返回列表 發帖

while 迴圈(一)

本帖最後由 歐柏罕 於 2017-12-16 13:59 編輯

本帖隱藏的內容需要回復才可以瀏覽

  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     int count=0;
  7.    
  8.    
  9.     while(count <= 10)
  10.     {
  11.            cout << count << endl;
  12.            count++;
  13.     }
  14.    
  15.     system("pause");
  16.     return 0;
  17. }
複製代碼

TOP

  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {   
  6.     int num=0;
  7.     while(num <=10)
  8.     {
  9.          cout<<num<<endl;  
  10.         num++;   
  11.     }
  12.     system("pause");
  13.     return 0;
  14. }
複製代碼

TOP

  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     int count=0;
  7.     while(count <= 10)
  8.     {
  9.            cout << count << endl;
  10.            count++;
  11.     }
  12.    
  13.     system("pause");
  14.     return 0;
  15. }
複製代碼

TOP

  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     int count=0;
  7.    
  8.    
  9.     while(count <= 10)
  10.     {
  11.            cout << count << endl;
  12.            count++;
  13.     }
  14.    
  15.     system("pause");
  16.     return 0;
  17. }
複製代碼

TOP

  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     int count=0;
  7.    
  8.    
  9.     while(count <= 10)
  10.     {
  11.            cout << count << endl;
  12.            count++;
  13.     }
  14.    
  15.     system("pause");
  16.     return 0;
  17. }
複製代碼

TOP

返回列表