I have to add the values that have two or more decimal places but when I put it on exp: "1.0", it fills the whole row automatically and jumps to the next, I reviewed and I do not know why it is giving error so thank you if you can help.
#include <stdio.h>
#include <stdlib.h>
#include <locale.h>
int main () { setlocale(LC_ALL,"Portuguese");
float matriz[7][4], soma = 0;
for ( int i = 0; i < 7; i++){
for ( int h = 0; h < 4; h++){
printf("\nInforme o valor da linha %i e coluna %i: ",i,h);
scanf("%f",&matriz[i][h]);
}
system ("cls");
}
for (int c = 0; c < 7; c++){
for ( int k = 0; k < 4; k++){
soma += matriz[c][k];
}
}
printf("\nO valor é: %.0f\n",soma);
return 0;
}