返回列表 發帖
  1. #include<iostream>                                                            
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {   
  6.     int n=0;
  7.     for(int i=1; i<=3; i++)
  8.     {
  9.          for(int b=1; b<=3; b++)
  10.          {
  11.               for(int c=1; c<=3; c++)
  12.               {
  13.                    for(int d=1; d<=3; d++)
  14.                    {
  15.                            n++;
  16.                            cout<<"第"<<n<<"次: "<<i<<" "<<b<<" "<<c<<" "<<d<<endl;
  17.                    }
  18.               }
  19.          }
  20.     }
  21.     system ("pause");
  22.     return 0;
  23. }
複製代碼

TOP

返回列表