C ++ program to print boundary element of matrix .
#include <bits/stdc++.h> NEW_LINE using namespace std ; const int MAX = 100 ; void printBoundary ( int a [ ] [ MAX ] , int m , int n ) { for ( int i = 0 ; i < m ; i ++ ) { for ( int j = 0 ; j < n ; j ++ ) { if ( i == 0 j == 0 i == n - 1 j == n - 1 ) cout << a [ i ] [ j ] << " ▁ " ; else cout << " ▁ " << " ▁ " ; } cout << " STRNEWLINE " ; } }