julian403
Full Member level 5
I take a secuence of 8bit from an ADC, so I used a char array.
I want to take the average, so
Then I want to see the value of average on a faile:
But there is nothing on the file. If average is int, it works. Why?
char array[10][10];
I want to take the average, so
float average=0;
float aux;
for(int i=0;i<10;i++)
{
for(int j=0;j<10;j++)
{
aux=average;
average= aux + array[j]
}}
Then I want to see the value of average on a faile:
fprintf(file, "%f", average);
But there is nothing on the file. If average is int, it works. Why?