返回列表 發帖
本帖最後由 張恩嘉 於 2016-5-27 09:54 編輯
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.       int sum=0;
  7.       for(int i=1 ;i<=3; i++)
  8.       {
  9.           for(int a=1 ;a<=3; a++)      
  10.           {
  11.               for(int b=1 ;b<=3; b++)
  12.               {
  13.                   for(int c=1 ;c<=3; c++)   
  14.                   {
  15.                   sum++;
  16.                   cout<<"第"<<sum<<"次:"<<i<<" "<<a<<" "<<b<<" "<<c<<endl;
  17.                   }
  18.               }
  19.           }      
  20.       }
  21.       system("pause");
  22.       return 0;   
  23. }
複製代碼
我要當超級版主==

TOP

返回列表