.


:




:

































 

 

 

 


. .




 

- .

(.4.19) . , , .

. . , .

(.4.20) . . , . . , , ( ), , . , , .

1024 10 .

 


 

++ . , . , : ( ) , ( ) . , , . ++ 12- .

 

 

.4.21 . a[i] [j].

 

a , i j , .

 

. , b[2] [2]

 

int b[2] [2] = { {1,2},{3,4} };

 

 

int b[2] [2] = { {1, },{3,4} };

 

, . .

 

.4.22 .

 

, .

 

// .4.22

#include "stdafx.h"

#include <iostream>

using namespace std;

 

void printArray(int [][3]);

int _tmain(int argc, _TCHAR* argv[])

 

{

 

int array1 [2][3]= {{1,2,3},{4,5,6}},

array2 [2][3]= {1,2,3,4,5},

array3 [2][3]={{1,2},{4}};

setlocale(LC_ALL, "rus");

cout<<" array1 :"<<endl;

printArray(array1);

cout<<" array2 :"<<endl;

printArray(array2);

cout<<" array3 :"<<endl;

printArray(array3);

 

return 0;

}

 

void printArray(int a[][3])

{

for(int i=0; i<=1; i++)

{

for(int j=0;j<=2; j++)

cout<< a[i][j]<<" ";

cout<<endl;

}

 

}

 





:


: 2016-12-31; !; : 658 |


:

:

.
==> ...

1515 - | 1351 -


© 2015-2024 lektsii.org - -

: 0.007 .