1
Hello, my doubt is the following, I would like to know how I do in the code below, so that my matrix is read inside the main, and after inside the subprogram, a vector receives the values of this matrix and and and displays the matrix read?
#include <stdio.h>
#define tam 4
void exibirresultado(int provNot[][3]);
int main(){
int provNot [tam][3];
int i,j;
printf("\n #########################################\n");
for(i=1; i<=tam; i++){
printf("Digite a nota do %d aluno:\n",i);
for(j=0; j<3; j++){
printf("Prova %d :\n",j+1);
scanf("%d",&provNot[i][j]);
}
}
exibirresultado(provNot);
}
void exibirresultado(int provNot[][3]){
int i,j,teste[tam][3];
for(i=1; i<=tam; i++){
for(j=0;i<3;j++){
teste[i][j]=provNot[i][j];
}
}
for(i=1; i<=tam; i++){
for(j=0;i<3;j++){
printf("%d === %d",i, teste[i][j]);
}
}
}