1 #include <iostream>
 2 using namespace std;
 3 
 4 int main()
 5 {
 6     int length;
 7     cout << "样本输入:"<<endl; 
 8     cin >> length;
 9     cout << "样本输出:"<<endl; 
10     for (int i = 1; i <= length; i++) 
11     {
12         for (int j = 1; j <= length; j++) 
13         {
14              cout << " ("<<i<<","<<j<<") ";
15              if (j == length) 
16              {
17                  cout << "\n";    
18              }
19         }
20     }
21     return 0;
22 }

一道C++题目

相关文章:

  • 2022-12-23
  • 2021-09-23
  • 2022-12-23
  • 2021-07-18
  • 2021-10-04
  • 2021-12-26
  • 2021-12-18
猜你喜欢
  • 2022-12-23
  • 2022-01-28
  • 2022-12-23
  • 2022-01-25
  • 2021-11-25
相关资源
相似解决方案