+1 vote
in Mathematics by kratos

Write a user-define function Upper-half() which takes a two dimensional array A, with N rows and N columns as argument and point the upper half of the array.

1 Answer

+1 vote
by kratos
 
Best answer

Void Upper-half(int b[][10],int N)

{ int i,j;

for(i=N;i>0;i--)

{ for(j=N;j>0;j--)

{ if(i>=j)

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

else

cout<<" ";

}

cout<<"\n";

}

}

...