Can you help me to make this code in c ++ please?:
Create a two-dimensional array or array that stores consecutive multiples of 7 (7, 14, 21, 28, ...). The number of rows and columns will be entered by keyboard. The sum of the numbers located in the four corners of the two-dimensional arrangement should be shown.
#include <iostream>
using namespace std;
int main(){
int numeros[100][100],filas,columnas, contador=1;
cout<<"Ingrese el numero de filas: ";
cin>>filas;
cout<<"ingrese el numero de columnas: ";
cin>>columnas;
for(int i=0; i< filas; i++){
for (int j=0;j<columnas;j++){
numeros[i][j] = contador*7;
contador++;
}
}
for(int i=0;i<filas;i++) {
for(int j=0;j<columnas;j++) {
cout<<numeros[i][j]<<" ";
}
cout<<"\n";
}
return 0;
}
I managed to create the matrix with multiples of 7 but I can not do the sum in the corners.
Thanks for the help.