In: Computer Science
#source code in c++:
#include <iostream>
using namespace std;
int main(){
int x[4],y[6][6];
for(int i=0;i<4;i++){
cout<<"Enter Element x"<<(i+1)<<" :";
cin>>x[i];
}
for(int i=0;i<6;i++){
for(int j=0;j<6;j++){
if(i<3 && j<3){
y[i][j]=x[3];
}else if(i<3 && j>=3){
y[i][j]=x[0];
}else if(i>=3 && j<3){
y[i][j]=x[2];
}else if(i>=3 && j>=3){
y[i][j]=x[1];
}
}
}
for(int i=0;i<6;i++){
for(int j=0;j<6;j++){
cout<<y[i][j]<<" ";
}cout<<endl;
}
return 0;
}
#output:
#if you have any doubt or more information needed comment below..i will respond as possible as soon...thanks...