0
The question ends up being logically easy, but I’m having difficulty knowing how to use the if condition in the values of the matrix, I don’t know how to do to mess with the values of the matrix. my code got just below but I get lost in how to fit the if
#include "stdio.h"
int main(void) {
float MatOriginal[3][5],MatFinal[3][5];
// entrada de dados
printf("escreva os valores da matriz original: \n");
for(int i=0;i<3;i++){
for(int j=0;j<5;j++){
printf("elemento (%d)(%d)",i+1,j+1);
scanf("%f",&MatOriginal[i][j]);
}
}
if(MatOriginal[3][5]<0)
MatOriginal[3][5] = - MatOriginal[3][5]
// escrita da matriz
printf(" \n A matriz original informada é = \n");
for(int i=0; i<3; i++)
{
printf(" \n ");
for(int j=0; j<5; j++){
printf(" %4.1f ", MatOriginal[i][j]);
}
}
return 0;
}