0
I am starting now in C programming and I have a problem in my C program. The problem is that the printout matrix appears all zeroed.
#include <stdio.h>
#include <stdlib.h>
int main (){
float m[4][4];
int i, j;
for(i=0;i<4;i++) {
for(j=0;j<4;j++){
m[i][j]=0;
}
}
for(i=0;i<4;i++){
for(j=0;j<4;j++){
printf("%d", m[i][j]);
}
printf("\n");
}
return 0;
}
Good the answer below, adding knowledge, check this link: https://www.clubedohardware.com.br/forums/topic/1166436-filling-matriz-usando-for-e-dowhile/ for more examples
– Luiz Augusto
Wow so much language taggada. Did you forget to
c--
andd
:-)– pmg