首页 > 代码库 > 折腾二维数组(一)

折腾二维数组(一)

#include<iostream>using namespace std;int main (){    int i,j;    int a[5][4]= {{0,1},{4,5},{8,9},{12,13},{16,17}};    cout<<"请输入10个整数:"<<endl;    for (i=0; i<5; i++)        for (j=2; j<4; j++)            cin>>a[i][j];    cout<<"数组中的值为:"<<endl;    for (i=0;i<5;i++)    {        cout<<"第"<<i<<"行:   ";        for (j=0; j<4; j++)            cout<<a[i][j]<<"    ";            cout<<endl;    }}

折腾二维数组(一)