第十四週項目一(1)——二次元配列を振り回す


/* Copyright (c) 2014,               
 * All rights reserved.     
 *     :test.cpp     
 *   :        
 *     :2014  11   30       
 *      :v1.0     
 *     
 *     :     
 *     :             
 *     :         
 */      
#include <iostream>
using namespace std;
int main()
{
    int i,j;
        //  5 4        ,         10      
    int a[5][4]={{0,1},{4,5},{8,9},{12,13},{16,17}};
        //        10     
    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]<<'\t';
        cout<<endl;
    }
    return 0;
}