CPP
cpp
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
#include <iostream>
using namespace std;
int main() {
int c;
cout<<"Enter size of the array";
cin>>c;
cout<<":"<<c<<endl;
cout<<endl;
int a[c][c];
for(int b=0;b<c;b++){
for(int x=0;x<c;x++){
a[b][x]=10+c*b+x;
cout<<a[b][x]<<" ";
}
cout<<endl;
}
cout<<endl;
cout<<"Removing the central element from array:"<<endl;
cout<<endl;
for(int y=0;y<c;y++)
{
for(int k=0;k<c;k++){
if(y>0 && y<c-1 && k<c-1 && k>0)
cout<<"*"<<" "<<" ";
else
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run