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 }
时间: 2024-10-20 06:24:45