#include<iostream>
using namespace std;
int main()
{
int array[3][3]={
{1,2,3},
{4,5,6},
{7,8,9}
};
int i,j;
for(i=1;i<=3;i++){
for(j=1;j<=3;j++){
cout << array[i-1][j-1] << ' ';
}
cout << endl;
}
return 0;
}
c++ 嵌套for循环
最新推荐文章于 2024-05-08 18:42:17 发布