/* Copyright (c) 2014, Yantai University School of Computer * All rights reserved. * File name: Test.cpp * Chen Dani * Completion date: November 30, 2014 * Version number: v1.0 * * Problem Description: No * Input Description: Enter some Integer * Program output: Output two-dimensional array */#include <iostream>using namespace Std;int main () {int i,j; Creates a two-dimensional integer array of 5 rows and 4 columns, assigning the initial value int a[5][4]={{0,1},{4,5},{8,9},{12,13},{16,17} to the 10 elements in the first two columns of the array; The keyboard input causes the value of the latter two columns 10 elements cout<< "Please enter 10 integers:" <<endl; for (i=0;i<5;i++) for (j=2;j<4;j++) cin>>a[i][j]; The number in the cout<< "array by row order precedence output is:" <<endl; for (i=0;i<5;i++) {cout<< "<<i<<" line: "; for (j=0;j<4;j++) cout<<a[i][j]<< ' \ t '; cout<<endl; } cout<< "Now multiply all elements by 3 times times ... Complete! "<<endl; cout<< "line order Priority output:" <<endl; for (i=0;i<5;i++) {cout<< "<<i<<" line: "; for (j=0;j<4;j++) cout<<3*a[i][j]<< ' \ t '; Cout<<endl; } return 0;}
14th Week Project One (2)--toss a two-dimensional array