6
I just have to add the lines but the values don’t make sense:
Here the code:
#include <stdio.h>
#include <stdlib.h>
int main (){
int matriz[6][6],i,h,somalinha[6];
for(i=0;i<=4;i++){
for(h=0;h<=4;h++){
printf("Digite os valores de uma matriz 3x3:\n");
scanf("%d",&matriz[i][h]);
somalinha[i] = somalinha[i]+matriz[i][h];
}
printf("O resultado da soma da linha %d eh %d\n",i,somalinha[i]);
}
return 0;
}
yes, it’s just that my teacher said that when it comes to matrices it’s always good to leave a bigger space
– Anderson Henrique
I think this only applies to char vectors, which need one more character to store the null character (which indicates the end of the string).
– Marcelo Henrique Bittencourt
ah so if it is so, thanks kk did not know
– Anderson Henrique