1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
#include <iostream.h>
#include <conio.h>
void process_Array(int Arr[][3],int x, int y);
void process_Array(int A[][3],int N, int M)
{
clrscr();
for (int R = 0; R < N; R++)
{
for (int C = 0; C < M; C=C+2)
{
cout<< A[R][C]<<" ";
}
}
cout<<endl;
cout<<endl;
for (int I = 0; I < N; I++)
{
for (int J = 0; J < M; J++)
{
cout << A[I][J]<<" ";
}
cout<<endl;
}
}
int main()
{
int arr[3][3] ={
{23, 54, 76},
{37, 19, 28},
{62, 13, 19},
};
process_Array(arr,3,3);
return 0;
}
|